Skip to content

Commit

Permalink
fix: hide grid selection column using JavaScript
Browse files Browse the repository at this point in the history
Hiding grid selection column with CSS breaks keyboard navigation

Close #156
  • Loading branch information
flang authored and javier-godoy committed Jan 24, 2024
1 parent 874cd8e commit 8b3326e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@

@SuppressWarnings("serial")
@JsModule(value = "./src/fc-twin-col-grid-auto-resize.js")
@CssImport(value = "./styles/multiselect-cb-hide.css", themeFor = "vaadin-grid")
@CssImport(value = "./styles/twin-col-grid-button.css")
@CssImport(value = "./styles/twincol-grid.css")
public class TwinColGrid<T> extends VerticalLayout
Expand Down Expand Up @@ -866,7 +865,8 @@ public FilterableTwinColumn<T> addFilterableColumn(ItemLabelGenerator<T> itemLab
public TwinColGrid<T> selectRowOnClick() {
forEachGrid(
grid -> {
grid.addClassName("hide-selector-col");
grid.getElement().executeJs(
"if (this.querySelector('vaadin-grid-flow-selection-column')) { this.querySelector('vaadin-grid-flow-selection-column').hidden = true }");

grid.addItemClickListener(
c -> {
Expand Down

This file was deleted.

0 comments on commit 8b3326e

Please sign in to comment.