@cdmx/wappler_ag_grid 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dmx-ag-grid.js +7 -7
- package/package.json +1 -1
package/dmx-ag-grid.js
CHANGED
|
@@ -390,6 +390,10 @@ dmx.Component('ag-grid', {
|
|
|
390
390
|
const cnames = this.props.cnames
|
|
391
391
|
const cwidths = this.props.cwidths
|
|
392
392
|
const ctypes = this.props.ctypes
|
|
393
|
+
if (!this.$node || !rowData || rowData.length === 0) {
|
|
394
|
+
console.error('No row data provided.');
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
393
397
|
let gridInstance = this.get('gridInstance') ? this.get('gridInstance') : null;
|
|
394
398
|
let pagination_page_size = gridInstance ? gridInstance.paginationGetPageSize() : this.props.pagination_page_size
|
|
395
399
|
const enableRowClickEvent = this.props.row_click_event && !this.props.enable_actions && !this.props.row_checkbox_event;
|
|
@@ -404,10 +408,6 @@ dmx.Component('ag-grid', {
|
|
|
404
408
|
const gridThemeClass = options.dark_mode ? `${options.grid_theme}-dark` : options.grid_theme;
|
|
405
409
|
this.$node.innerHTML = `<div id=${options.id}-grid class="${gridThemeClass}"></div>`;
|
|
406
410
|
let idFieldPresent = false;
|
|
407
|
-
if (!rowData || rowData.length === 0) {
|
|
408
|
-
console.error('No row data provided.');
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
411
|
window.cellClickEvent = (columnName, value, idValue) => {
|
|
412
412
|
this.set('fields', {"field": columnName, "data": value});
|
|
413
413
|
this.set('id', idValue);
|
|
@@ -1904,15 +1904,15 @@ dmx.Component('ag-grid', {
|
|
|
1904
1904
|
|
|
1905
1905
|
requestUpdate: function (props, oldValue) {
|
|
1906
1906
|
this.set('count', this.props.data.length);
|
|
1907
|
-
if (!dmx.equal(this.props.data, oldValue
|
|
1907
|
+
if (!dmx.equal(this.props.data, oldValue?.data) && !this.props.noload) {
|
|
1908
1908
|
let gridInstance = this.refreshGrid();
|
|
1909
1909
|
this.set('gridInstance', gridInstance);
|
|
1910
1910
|
}
|
|
1911
|
-
if (!dmx.equal(this.props.dark_mode, oldValue
|
|
1911
|
+
if (!dmx.equal(this.props.dark_mode, oldValue?.dark_mode)) {
|
|
1912
1912
|
let gridInstance = this.refreshGrid();
|
|
1913
1913
|
this.set('gridInstance', gridInstance);
|
|
1914
1914
|
}
|
|
1915
|
-
if (!dmx.equal(this.props.cfilters, oldValue
|
|
1915
|
+
if (!dmx.equal(this.props.cfilters, oldValue?.cfilters)){
|
|
1916
1916
|
let gridInstance = this.get('gridInstance');
|
|
1917
1917
|
if (gridInstance && this.props.cfilters && this.props.cfilters.length > 0) {
|
|
1918
1918
|
var filterModel = {};
|