(index: number, dragging: boolean)
| 307 | } |
| 308 | |
| 309 | function updateDragging(index: number, dragging: boolean) { |
| 310 | if (isDisabled || !isThumbEditable(index)) { |
| 311 | return; |
| 312 | } |
| 313 | if (dragging) { |
| 314 | valuesRef.current = values; |
| 315 | } |
| 316 | |
| 317 | const wasDragging = isDraggingsRef.current[index]; |
| 318 | isDraggingsRef.current = replaceIndex(isDraggingsRef.current, index, dragging); |
| 319 | setDraggings(isDraggingsRef.current); |
| 320 | |
| 321 | // Call onChangeEnd if no handles are dragging. |
| 322 | if (onChangeEnd && wasDragging && !isDraggingsRef.current.some(Boolean)) { |
| 323 | onChangeEnd(valuesRef.current); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | let listFormatRef = useRef<Intl.ListFormat | null>(null); |
| 328 |
nothing calls this directly
no test coverage detected