IGNITE-11710 Web Console: Exposed callback to ui-grid.api for manipulations with ui-grid.
diff --git a/frontend/app/components/grid-item-selected/controller.js b/frontend/app/components/grid-item-selected/controller.js
index 3803c96..ab35849 100644
--- a/frontend/app/components/grid-item-selected/controller.js
+++ b/frontend/app/components/grid-item-selected/controller.js
@@ -23,7 +23,7 @@
}
$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/frontend/app/components/ui-grid/component.js b/frontend/app/components/ui-grid/component.js
index 11ce4d7..cb9a927 100644
--- a/frontend/app/components/ui-grid/component.js
+++ b/frontend/app/components/ui-grid/component.js
@@ -43,6 +43,7 @@
selectedRowsId: '<?',
// Output events.
- onSelectionChange: '&?'
+ onSelectionChange: '&?',
+ onApiRegistered: '&?'
}
};
diff --git a/frontend/app/components/ui-grid/controller.js b/frontend/app/components/ui-grid/controller.js
index a6197b4..230b9da 100644
--- a/frontend/app/components/ui-grid/controller.js
+++ b/frontend/app/components/ui-grid/controller.js
@@ -142,6 +142,9 @@
this.resizeObserver = new ResizeObserver(() => api.core.handleWindowResize());
this.resizeObserver.observe(this.$element[0]);
+
+ if (this.onApiRegistered)
+ this.onApiRegistered({$event: api});
}
};
diff --git a/frontend/app/components/ui-grid/style.scss b/frontend/app/components/ui-grid/style.scss
index d3b8c05..85ce77b 100644
--- a/frontend/app/components/ui-grid/style.scss
+++ b/frontend/app/components/ui-grid/style.scss
@@ -43,22 +43,6 @@
}
}
- .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 {