Fix cell selection rendering with split container
With the row headers implementation client-side Grid widget is
configured to use split container. When cell selection is set, the
render config needs to be updated on both sub-containers.
Change-Id: I8243d7f49301d4500925ddfa6e77c0d9f0d1b931
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/remote/handler/GridHandler.js b/bundles/org.eclipse.rap.rwt/js/rwt/remote/handler/GridHandler.js
index 2250c60..cfddf55 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/remote/handler/GridHandler.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/remote/handler/GridHandler.js
@@ -111,7 +111,7 @@
}
},
"cellSelectionEnabled" : function( widget, value ) {
- widget.getRenderConfig().cellSelection = value;
+ rwt.widgets.util.GridUtil.setCellSelectionEnabled( widget, value );
},
"cellSelection" : function( widget, value ) {
widget.deselectAllCells();
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/util/GridUtil.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/util/GridUtil.js
index 712816a..2a50bb3 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/util/GridUtil.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/util/GridUtil.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2011, 2020 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,6 +25,14 @@
}
},
+ setCellSelectionEnabled : function( grid, value ) {
+ var container = grid.getRowContainer();
+ container.getRenderConfig().cellSelection = value;
+ if( container._updateConfig ) {
+ container._updateConfig();
+ }
+ },
+
///////////////
// API for Grid