(index: number, value: number)
| 295 | } |
| 296 | |
| 297 | function updateValue(index: number, value: number) { |
| 298 | if (isDisabled || !isThumbEditable(index)) { |
| 299 | return; |
| 300 | } |
| 301 | const thisMin = getThumbMinValue(index); |
| 302 | const thisMax = getThumbMaxValue(index); |
| 303 | |
| 304 | // Round value to multiple of step, clamp value between min and max |
| 305 | value = snapValueToStep(value, thisMin, thisMax, step); |
| 306 | let newValues = replaceIndex(valuesRef.current, index, value); |
| 307 | setValues(newValues); |
| 308 | } |
| 309 | |
| 310 | function updateDragging(index: number, dragging: boolean) { |
| 311 | if (isDisabled || !isThumbEditable(index)) { |
no test coverage detected