MCPcopy Create free account
hub / github.com/adobe/react-spectrum / incrementThumb

Function incrementThumb

packages/react-stately/src/slider/useSliderState.ts:371–374  ·  view source on GitHub ↗
(index: number, stepSize: number = 1)

Source from the content-addressed store, hash-verified

369 }
370
371 function incrementThumb(index: number, stepSize: number = 1) {
372 let s = Math.max(stepSize, step);
373 updateValue(index, snapValueToStep(values[index] + s, minValue, maxValue, step));
374 }
375
376 function decrementThumb(index: number, stepSize: number = 1) {
377 let s = Math.max(stepSize, step);

Callers 2

onKeyDownFunction · 0.85
onMoveFunction · 0.85

Calls 2

snapValueToStepFunction · 0.90
updateValueFunction · 0.85

Tested by

no test coverage detected