()
| 550 | }; |
| 551 | |
| 552 | const commitValue = () => { |
| 553 | if (allowsCustomValue) { |
| 554 | const itemText = |
| 555 | selectedKey != null ? (collection.getItem(selectedKey)?.textValue ?? '') : ''; |
| 556 | inputValue === itemText ? commitSelection() : commitCustomValue(); |
| 557 | } else { |
| 558 | // Reset inputValue and close menu |
| 559 | commitSelection(); |
| 560 | } |
| 561 | }; |
| 562 | |
| 563 | let commit = () => { |
| 564 | if (triggerState.isOpen && selectionManager.focusedKey != null) { |
no test coverage detected