Table of Contents
The Combobox Component
WIP page. TODO:
- usage
- events
- keyboard
- eg-org-select is not a complete clone of eg-combobox
Keyboard Events
added to eg-combobox and eg-org-select as part of the Item Alerts, Notes, Tags, and Templates Rework (bug 2074112). There are new event emitters to allow keyboard shortcuts in general, and there is a specific one for the Enter key where the selected value is emitted.
Examples:
Support for keyboard events was added to eg-combobox and eg-org-select as part of the Item Alerts, Notes, Tags, and Templates Rework (bug 2074112), building on the keyboard shortcuts previously added in the MARC rich editor to open the suggestion list.
There are new event emitters to allow keyboard shortcuts in general, and there is a specific one for the Enter key where the selected value is emitted.
<eg-combobox (comboboxEnter)="saveSelectedValueSomewhere($event)" (comboboxKeydown)="$event.key === 'Escape' ? cancel() : handleKeydown($event)" /> <eg-combobox> <eg-org-select (orgSelectEnter)="saveSelectedOrgSomewhere($event)" (orgSelectKey)="$event.key === 'Escape' ? cancel() : handleKeydown($event)" /> </eg-org-select>
The Enter key event's payload is the selected option ID. The generic keyboard handler is a keyboard event.