Skip to content

Select menu behavior #223

@jfmaggie

Description

@jfmaggie

Problems

Check select menu stories in storybook and some use case in our segment app I think there are a few issues for select menu:

  1. Use keyboard arrow key up/down, the list doesn't scroll into the selected position, so you can't see where you are at in the list

kapture 2018-07-12 at 13 43 15

  1. Use keyboard arrow key up/down are selecting the current item. Checked some select menu examples such as http://blueprintjs.com/docs/versions/2/#select/select-component, Github Assignees issue selector, the list allows us use arrow key to browse list items without triggering select immediately. So we consume the original state of selected item if we only browse list. That being said, hitting enter key should select the item. onSelect should be the prop that let user decide if menu should be closed or deselect.

Example of working select menu

kapture 2018-07-12 at 13 44 26

  1. After close the menu, while it's still focused on the toggle button, hit enter won't open the menu. Only pressing the enter key down will keep the menu open.

Evergreen select menu

kapture 2018-07-12 at 13 59 32

Example of working select menu

kapture 2018-07-12 at 13 58 37

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions