diff --git a/src/main/java/com/flowingcode/vaadin/addons/twincolgrid/TwinColGrid.java b/src/main/java/com/flowingcode/vaadin/addons/twincolgrid/TwinColGrid.java index 167b788..149aeb4 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/twincolgrid/TwinColGrid.java +++ b/src/main/java/com/flowingcode/vaadin/addons/twincolgrid/TwinColGrid.java @@ -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 extends VerticalLayout @@ -866,7 +865,8 @@ public FilterableTwinColumn addFilterableColumn(ItemLabelGenerator itemLab public TwinColGrid 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 -> { diff --git a/src/main/resources/META-INF/resources/frontend/styles/multiselect-cb-hide.css b/src/main/resources/META-INF/resources/frontend/styles/multiselect-cb-hide.css deleted file mode 100644 index e78f0dd..0000000 --- a/src/main/resources/META-INF/resources/frontend/styles/multiselect-cb-hide.css +++ /dev/null @@ -1,23 +0,0 @@ -/*- - * #%L - * TwinColGrid add-on - * %% - * Copyright (C) 2017 - 2022 Flowing Code - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -:host(.hide-selector-col) [part~="cell"][first-column] { - display: none; -}