User Tools

Site Tools


dev:eg-combobox

The Combobox Component

WIP page. TODO:

  1. usage
  2. events
    • keyboard
  3. 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.

Frustration Memes

When combobox is driving you crazy:

dev/eg-combobox.txt · Last modified: 2025/04/02 15:59 by sleary

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.