()
| 581 | }; |
| 582 | |
| 583 | let commit = () => { |
| 584 | if (triggerState.isOpen && selectionManager.focusedKey != null) { |
| 585 | // Reset inputValue and close menu here if the selected key is already the focused key. Otherwise |
| 586 | // fire onSelectionChange to allow the application to control the closing. |
| 587 | if (selectionManager.isSelected(selectionManager.focusedKey) && selectionMode === 'single') { |
| 588 | commitSelection(true); |
| 589 | } else { |
| 590 | selectionManager.select(selectionManager.focusedKey); |
| 591 | } |
| 592 | } else { |
| 593 | commitValue(); |
| 594 | } |
| 595 | }; |
| 596 | |
| 597 | let valueOnFocus = useRef([inputValue, displayValue]); |
| 598 | let setFocused = (isFocused: boolean) => { |
nothing calls this directly
no test coverage detected