aboutsummaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorTatu Lund <tatu@vaadin.com>2019-06-26 13:42:10 +0300
committerZhe Sun <31067185+ZheSun88@users.noreply.github.com>2019-06-26 13:42:10 +0300
commit487e450c61dd2eeaa32da3ec048dd0efb8fc7aa2 (patch)
tree9d1104fd515cbf82d538f7b47790e30a3cfa7718 /client/src
parent3652c3a8f1ed7fc8f6e27fb2242027732fa41404 (diff)
downloadvaadin-framework-487e450c61dd2eeaa32da3ec048dd0efb8fc7aa2.tar.gz
vaadin-framework-487e450c61dd2eeaa32da3ec048dd0efb8fc7aa2.zip
Adding css class to Editor when on selected row (#11636)
* Adding "v-grid-editor-selected" stylename in editor cell wrapper element when Grid is opened on selected row.
Diffstat (limited to 'client/src')
-rwxr-xr-xclient/src/main/java/com/vaadin/client/widgets/Grid.java9
1 files changed, 9 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 4c88879ad1..6537b8642c 100755
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -1908,6 +1908,15 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
updateBufferedStyleName();
+ // Add class name with selected modifier if the editor is being
+ // opened on selected row, see #11634
+ String selectedStylename = styleName + "-selected";
+ if (grid.isSelected(grid.getDataSource().getRow(getRow()))) {
+ cellWrapper.addClassName(selectedStylename);
+ } else {
+ cellWrapper.removeClassName(selectedStylename);
+ }
+
int frozenColumns = grid.getVisibleFrozenColumnCount();
double frozenColumnsWidth = 0;
double cellHeight = 0;