This is an automated email from the ASF dual-hosted git repository.
akuznetsov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new fa54df9 IGNITE-11742 Web console: Fixed "grid-showing-rows" component
in grids with no selection. Fixes #6450.
fa54df9 is described below
commit fa54df94692d5c2ea504e3fef0ab86c541561234
Author: Ilya Borisov <[email protected]>
AuthorDate: Mon Apr 15 18:40:09 2019 +0700
IGNITE-11742 Web console: Fixed "grid-showing-rows" component in grids with
no selection. Fixes #6450.
---
.../frontend/app/components/grid-showing-rows/controller.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git
a/modules/web-console/frontend/app/components/grid-showing-rows/controller.js
b/modules/web-console/frontend/app/components/grid-showing-rows/controller.js
index b9e2e8e..31d09bb 100644
---
a/modules/web-console/frontend/app/components/grid-showing-rows/controller.js
+++
b/modules/web-console/frontend/app/components/grid-showing-rows/controller.js
@@ -35,12 +35,18 @@ export default class {
this.gridApi.core.on.rowsVisibleChanged(this.$scope, () => {
this.applyValues();
});
- this.gridApi.selection.on.rowSelectionChanged(this.$scope, () =>
this.updateSelectedCount());
- this.gridApi.selection.on.rowSelectionChangedBatch(this.$scope, ()
=> this.updateSelectedCount());
+
+ if (this.gridApi.selection) {
+ this.gridApi.selection.on.rowSelectionChanged(this.$scope, ()
=> this.updateSelectedCount());
+
this.gridApi.selection.on.rowSelectionChangedBatch(this.$scope, () =>
this.updateSelectedCount());
+ }
}
}
updateSelectedCount() {
+ if (!this.gridApi.selection)
+ return;
+
this.selected = this.gridApi.selection.getSelectedCount();
}