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

Function revert

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

Source from the content-addressed store, hash-verified

508
509 // Revert input value and close menu
510 let revert = () => {
511 if (allowsCustomValue && selectedKey == null) {
512 commitCustomValue();
513 } else {
514 commitSelection();
515 }
516 };
517
518 let commitCustomValue = () => {
519 if (selectionMode === 'multiple') {

Callers 1

Calls 2

commitCustomValueFunction · 0.85
commitSelectionFunction · 0.70

Tested by

no test coverage detected