You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2019/04/10 04:54:21 UTC
[ignite] branch master updated: IGNITE-11710 Web Console: Exposed
callback to ui-grid.api for manipulations with ui-grid.
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 0512e86 IGNITE-11710 Web Console: Exposed callback to ui-grid.api for manipulations with ui-grid.
0512e86 is described below
commit 0512e8638c3671e8b0c8be3dae6b4d59f9c56919
Author: Alexander Kalinin <ve...@yandex.ru>
AuthorDate: Wed Apr 10 11:44:23 2019 +0700
IGNITE-11710 Web Console: Exposed callback to ui-grid.api for manipulations with ui-grid.
---
.../app/components/grid-item-selected/controller.js | 2 +-
.../frontend/app/components/ui-grid/component.js | 3 ++-
.../frontend/app/components/ui-grid/controller.js | 3 +++
.../frontend/app/components/ui-grid/style.scss | 16 ----------------
4 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/modules/web-console/frontend/app/components/grid-item-selected/controller.js b/modules/web-console/frontend/app/components/grid-item-selected/controller.js
index 3803c96..ab35849 100644
--- a/modules/web-console/frontend/app/components/grid-item-selected/controller.js
+++ b/modules/web-console/frontend/app/components/grid-item-selected/controller.js
@@ -23,7 +23,7 @@ export default class {
}
$onChanges(changes) {
- if (changes && 'gridApi' in changes && changes.gridApi.currentValue) {
+ if (changes && 'gridApi' in changes && changes.gridApi.currentValue && this.gridApi.selection) {
this.applyValues();
this.gridApi.grid.registerDataChangeCallback(() => this.applyValues(), [this.uiGridConstants.dataChange.ROW]);
diff --git a/modules/web-console/frontend/app/components/ui-grid/component.js b/modules/web-console/frontend/app/components/ui-grid/component.js
index 11ce4d7..cb9a927 100644
--- a/modules/web-console/frontend/app/components/ui-grid/component.js
+++ b/modules/web-console/frontend/app/components/ui-grid/component.js
@@ -43,6 +43,7 @@ export default {
selectedRowsId: '<?',
// Output events.
- onSelectionChange: '&?'
+ onSelectionChange: '&?',
+ onApiRegistered: '&?'
}
};
diff --git a/modules/web-console/frontend/app/components/ui-grid/controller.js b/modules/web-console/frontend/app/components/ui-grid/controller.js
index a6197b4..230b9da 100644
--- a/modules/web-console/frontend/app/components/ui-grid/controller.js
+++ b/modules/web-console/frontend/app/components/ui-grid/controller.js
@@ -142,6 +142,9 @@ export default class IgniteUiGrid {
this.resizeObserver = new ResizeObserver(() => api.core.handleWindowResize());
this.resizeObserver.observe(this.$element[0]);
+
+ if (this.onApiRegistered)
+ this.onApiRegistered({$event: api});
}
};
diff --git a/modules/web-console/frontend/app/components/ui-grid/style.scss b/modules/web-console/frontend/app/components/ui-grid/style.scss
index d3b8c05..85ce77b 100644
--- a/modules/web-console/frontend/app/components/ui-grid/style.scss
+++ b/modules/web-console/frontend/app/components/ui-grid/style.scss
@@ -43,22 +43,6 @@ ignite-grid-table {
}
}
- .ui-grid.ui-grid--ignite.ui-grid--thin-rows {
- .ui-grid-row {
- height: 36px !important;
-
- .ui-grid-cell {
- height: 100% !important;
- }
- }
-
- .ui-grid-cell .ui-grid-cell-contents {
- padding: 8px 20px !important;
- min-height: 35px !important;
- max-height: 35px !important;
- }
- }
-
.ui-grid.ui-grid--ignite:not(.ui-grid--thin) {
// Start section row height.
.ui-grid-row {