diff options
author | Anna Koskinen <Ansku@users.noreply.github.com> | 2021-03-03 12:08:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 12:08:38 +0200 |
commit | c7345a730db2df83e0aebb335dcbd69126ec6ced (patch) | |
tree | 7bddc0f275f0d51fb674dc61e4821ee8fa3c0e19 /client | |
parent | e858bc8a13c539e1093c4670927e3ccd973981d5 (diff) | |
download | vaadin-framework-c7345a730db2df83e0aebb335dcbd69126ec6ced.tar.gz vaadin-framework-c7345a730db2df83e0aebb335dcbd69126ec6ced.zip |
Fix displaying checkboxes within Grid editor row. (#12212)
* Fix displaying checkboxes within Grid editor row.
- Checkbox margins should match regular row content margins.
- Multiselect checkbox label should only be visible for assistive
devices.
Diffstat (limited to 'client')
-rwxr-xr-x | client/src/main/java/com/vaadin/client/widgets/Grid.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java index 99a4a269bd..8a78201cb4 100755 --- a/client/src/main/java/com/vaadin/client/widgets/Grid.java +++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java @@ -1973,6 +1973,13 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, // editor overlay since the original one is hidden by // the overlay final CheckBox checkBox = GWT.create(CheckBox.class); + checkBox.setStylePrimaryName(grid.getStylePrimaryName() + + "-selection-checkbox"); + + // label of checkbox should only be visible for + // assistive devices + checkBox.addStyleName("v-assistive-device-only-label"); + checkBox.setValue( grid.isSelected(pinnedRowHandle.getRow())); checkBox.sinkEvents(Event.ONCLICK); |