MatBlazor icon indicating copy to clipboard operation
MatBlazor copied to clipboard

Allow selection from keyboard without using mouse

Open dbowser opened this issue 5 years ago • 1 comments

Currently after entering a filter, the list is displayed. There seems to be no way to use this without using a mouse. This should be possible using the arrow keys to highlight one of the displayed options and the enter key to select it.

Expected behavior When the list is displayed, one of the items (probably default to the first) should have a highlight such as a border. The user should be able to use the up and down arrow keys to move up and down the list and home and ideally end to go to beginning or end of list. The list will change as the user types alphanumeric characters. The selection could reset to the first item if they currently selected item is no longer in the list. The user should be able to select the highlighted item using the enter key.

When an item is selected using the keyboard or mouse, the selection list should disappear and the selected value should be placed in the selection area. Currently this is not working reliably even when selection is done by a mouse.

Also, if a label is not provided then the height of the label area should be set to 0. Currently it is not and makes this control higher than necessary and when used in a line with other controls this messes up spacing.

Thanks!

dbowser avatar Feb 02 '21 14:02 dbowser

@dbowser , We are always looking for contributors if you want to open a PR. 🙂

Christian-Oleson avatar Mar 08 '21 00:03 Christian-Oleson