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

Function keyboardUpdate

packages/react-aria/src/color/useColorArea.ts:114–121  ·  view source on GitHub ↗
(cb, inputRef: RefObject<HTMLInputElement | null>, input: 'x' | 'y')

Source from the content-addressed store, hash-verified

112 let currentPosition = useRef<{x: number; y: number} | null>(null);
113
114 let keyboardUpdate = (cb, inputRef: RefObject<HTMLInputElement | null>, input: 'x' | 'y') => {
115 state.setDragging(true);
116 setValueChangedViaKeyboard(true);
117 cb();
118 state.setDragging(false);
119 focusInput(inputRef);
120 setFocusedInput(input);
121 };
122
123 let {keyboardProps} = useKeyboard({
124 shortcuts: {

Callers 1

useColorAreaFunction · 0.70

Calls 2

setDraggingMethod · 0.65
cbFunction · 0.50

Tested by

no test coverage detected