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

Function setThumbPercent

packages/react-stately/src/slider/useSliderState.ts:358–360  ·  view source on GitHub ↗
(index: number, percent: number)

Source from the content-addressed store, hash-verified

356 }
357
358 function setThumbPercent(index: number, percent: number) {
359 updateValue(index, getPercentValue(percent));
360 }
361
362 function getRoundedValue(value: number) {
363 return Math.round((value - minValue) / step) * step + minValue;

Callers 1

onMoveFunction · 0.85

Calls 2

updateValueFunction · 0.85
getPercentValueFunction · 0.85

Tested by

no test coverage detected