This repository was archived by the owner on Mar 4, 2020. It is now read-only.
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Address dropdown improvement requests #560
Closed
Description
This summarizes all points mentioned in the comments untill 1/3/2019:
Code:
- rename DropdownLabel to DropdownSelectedItem and make changes as necessary (refactor(Dropdown): rename DropdownLabel to DropdownSelectedItem #725)
- improve semantics/description of DropdownLabel onClick prop, as it applies only on image/text click.
- refactor setA11yState to use Portal. Follow up with Roman on this.
- allow getA11ySelectionMessage, itemToString and items (possibly others) to accept React.Elements.
- refactor toggleButton, change the name, make it accept Shorthand.
- cleanup
getA11yStatusMessage
andA11yStatusMessageOptions
once updated versions get released in Downshift. - improve the attribute handling of the toggleButton, from Downshift or overrinding attributes better in Stardust.
Functionality:
- add clearable prop to replace the toggle icon and which will clear the selected value(s) (feat(Dropdown): add
clearable
prop #885) - when Dropdown is closed, focused, has single selection and has selected value, Up/Down Arrows need to open the list at selection position -/+ 1.
- when Dropdown is closed, focused, has single selection and has selected value, click/Spacebar/Enter need to open the list at selected position.
- when Dropdown is open and has single selection, hitting character key needs to jump highlighted option to the one starting with that key. In case of multiple options, a list with options needs to be generated and looped over.
- when Dropdown is open, hitting End/Home should highlight last/first option.
- when Dropdown is closed and has multiple selection, Left/Right need to move focus between the selected options (to be defined if it should go through 'X' icons, label titles (which will be focusable with user defined action), or both).
- expose DropdownLabel render callback prop.
- have loader for async operations (feat(Dropdown): add
loading
prop #729) - have toggleButton (toggleIndicator) to appear by default in the examples (feat(Dropdown): add
loading
prop #729) - have aria-expanded on the triggerButton, if Dropdown is not a search.
Style: (#786)
- corner rounding, on combobox corners, when closed, and on combobox upper and listbox lower, when open.
- border bottom from or combobox div adds a strange rounding on the container border bottom, when it's focused.
- style a border around the options list.
- fix issue with list maxHeight. Follow up with Embedd team on this.