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

Function revert

packages/react-stately/src/combobox/useComboBoxState.ts:527–534  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

525
526 // Revert input value and close menu
527 let revert = () => {
528 closedDueToEmpty.current = false;
529 if (allowsCustomValue && selectedKey == null) {
530 commitCustomValue();
531 } else {
532 commitSelection();
533 }
534 };
535
536 let commitCustomValue = () => {
537 if (selectionMode === 'multiple') {

Callers 1

Calls 2

commitCustomValueFunction · 0.85
commitSelectionFunction · 0.70

Tested by

no test coverage detected