summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-03-30 13:36:09 +0300
committerHenri Sara <henri.sara@gmail.com>2017-03-30 13:36:09 +0300
commit7ff30d7c081a6da03fff57b5d1f44826fa3c06a9 (patch)
tree40b91e576594d0415461404bc7fdad1eab9d1c4b /client
parent400b4eedcbb8cc3e1bd6e4861a0620978509c932 (diff)
downloadvaadin-framework-7ff30d7c081a6da03fff57b5d1f44826fa3c06a9.tar.gz
vaadin-framework-7ff30d7c081a6da03fff57b5d1f44826fa3c06a9.zip
Fix column indexing when setting a renderer (#8976)
Fixes #8943
Diffstat (limited to 'client')
-rwxr-xr-xclient/src/main/java/com/vaadin/client/widgets/Grid.java9
1 files changed, 5 insertions, 4 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 50616c7930..746ff2be25 100755
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -4884,10 +4884,11 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
ColumnConfiguration conf = null;
int index = 0;
- if (grid != null && (bodyRenderer instanceof WidgetRenderer
- || renderer instanceof WidgetRenderer)) {
+ if (!isHidden() && grid != null
+ && (bodyRenderer instanceof WidgetRenderer
+ || renderer instanceof WidgetRenderer)) {
// Column needs to be recreated.
- index = grid.getColumns().indexOf(this);
+ index = grid.getVisibleColumns().indexOf(this);
conf = grid.escalator.getColumnConfiguration();
widthInConfiguration = conf.getColumnWidth(index);
@@ -4908,7 +4909,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
conf.setColumnWidth(index, widthInConfiguration);
}
- if (grid != null) {
+ if (!isHidden() && grid != null) {
grid.requestRefreshBody();
}
}