web-components
web-components copied to clipboard
[grid] Optional radio button column for single-select mode
A static radio-button column, corresponding to the checkbox column for multi-select, would be beneficial for single-select Grids in three ways:
- Visually indicates to the user that rows are (single) selectable in a way that is consistent with multi-select.
- Selection by clicking regular cells could be optionally disabled to prevent usability conflicts with interactive cell contents (e.g. buttons)
- Solves current issue with editable cells not usable for seletion in
vaadin-grid-pro
by providing a dedicated selection element.
There is an example how to do this yourself here https://github.com/TatuLund/devday-demo-flow/blob/master/src/main/java/com/vaadin/devday/demo/views/GridView.java#L197 In addition to component column you need also extended radio button https://github.com/TatuLund/devday-demo-flow/blob/master/src/main/java/com/vaadin/devday/demo/views/GridView.java#L404
This is a good suggestion for accessibility when a vaadin-grid only has editable component columns, e.g. TextFields.