IGNITE-10936 Web Console: Added support for single select mode on ui-grid.
authorVasiliy Sisko <vsisko@gridgain.com>
Tue, 15 Jan 2019 02:58:09 +0000 (09:58 +0700)
committerAlexey Kuznetsov <akuznetsov@apache.org>
Tue, 15 Jan 2019 02:58:09 +0000 (09:58 +0700)
modules/web-console/frontend/app/components/ui-grid/component.js
modules/web-console/frontend/app/components/ui-grid/controller.js

index d75cc6c..11ce4d7 100644 (file)
@@ -36,6 +36,7 @@ export default {
         items: '<',
         columnDefs: '<',
         categories: '<?',
+        singleSelect: '<?',
         oneWaySelection: '<?',
         rowIdentityKey: '@?',
         selectedRows: '<?',
index ec7101b..a6197b4 100644 (file)
@@ -42,6 +42,9 @@ export default class IgniteUiGrid {
     /** @type */
     categories;
 
+    /** @type {boolean} */
+    singleSelect;
+
     /** @type */
     onSelectionChange;
 
@@ -58,6 +61,9 @@ export default class IgniteUiGrid {
 
     /**
      * @param {ng.IScope} $scope
+     * @param $element
+     * @param $timeout
+     * @param gridUtil
      */
     constructor($scope, $element, $timeout, gridUtil) {
         this.$scope = $scope;
@@ -85,6 +91,8 @@ export default class IgniteUiGrid {
             columnDefs: this.columnDefs,
             categories: this.categories,
             rowHeight: this.rowHeight,
+            multiSelect: !this.singleSelect,
+            enableSelectAll: !this.singleSelect,
             headerRowHeight: this.headerRowHeight,
             columnVirtualizationThreshold: 30,
             enableColumnMenus: false,