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

Function end

packages/react-aria/src/selection/useSelectableCollection.ts:312–330  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

310 };
311
312 let end = (e: KeyboardEvent) => {
313 if (delegate.getLastKey) {
314 if (manager.focusedKey === null && e.shiftKey) {
315 return false;
316 }
317 let lastKey = delegate.getLastKey(manager.focusedKey, isCtrlKeyPressed(e));
318 manager.setFocusedKey(lastKey);
319 if (lastKey != null) {
320 if (isCtrlKeyPressed(e) && e.shiftKey && manager.selectionMode === 'multiple') {
321 manager.extendSelection(lastKey);
322 return;
323 } else if (selectOnFocus) {
324 manager.replaceSelection(lastKey);
325 return;
326 }
327 }
328 }
329 return false;
330 };
331
332 let pageDown = (e: KeyboardEvent) => {
333 if (delegate.getKeyPageBelow && manager.focusedKey != null) {

Calls 5

isCtrlKeyPressedFunction · 0.90
getLastKeyMethod · 0.65
setFocusedKeyMethod · 0.65
extendSelectionMethod · 0.65
replaceSelectionMethod · 0.65

Tested by

no test coverage detected