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