Skip to content

Commit

Permalink
Callback array values should not be readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
mj12albert committed Jan 7, 2025
1 parent 69165b8 commit 8ab8f6f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/react/src/slider/root/useSliderRoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export function useSliderRoot(parameters: useSliderRoot.Parameters): useSliderRo

const setValue = useEventCallback(
(
newValue: number | readonly number[],
newValue: number | number[],
newPercentageValues: readonly number[],
thumbIndex: number,
event: Event,
Expand Down Expand Up @@ -492,11 +492,7 @@ export namespace useSliderRoot {
* You can pull out the new value by accessing `event.target.value` (any).
* @param {number} activeThumbIndex Index of the currently moved thumb.
*/
onValueChange: (
value: number | readonly number[],
event: Event,
activeThumbIndex: number,
) => void;
onValueChange: (value: number | number[], event: Event, activeThumbIndex: number) => void;
/**
* Callback function that is fired when the `pointerup` is triggered.
*
Expand Down Expand Up @@ -558,7 +554,7 @@ export namespace useSliderRoot {
* Callback to invoke change handlers after internal value state is updated.
*/
setValue: (
newValue: number | readonly number[],
newValue: number | number[],
newPercentageValue: readonly number[],
activeThumb: number,
event: Event,
Expand Down

0 comments on commit 8ab8f6f

Please sign in to comment.