()
| 561 | }; |
| 562 | |
| 563 | let commit = () => { |
| 564 | if (triggerState.isOpen && selectionManager.focusedKey != null) { |
| 565 | // Reset inputValue and close menu here if the selected key is already the focused key. Otherwise |
| 566 | // fire onSelectionChange to allow the application to control the closing. |
| 567 | if (selectionManager.isSelected(selectionManager.focusedKey) && selectionMode === 'single') { |
| 568 | commitSelection(true); |
| 569 | } else { |
| 570 | selectionManager.select(selectionManager.focusedKey); |
| 571 | } |
| 572 | } else { |
| 573 | commitValue(); |
| 574 | } |
| 575 | }; |
| 576 | |
| 577 | let valueOnFocus = useRef([inputValue, displayValue]); |
| 578 | let setFocused = (isFocused: boolean) => { |
nothing calls this directly
no test coverage detected