@cdmx/wappler_ag_grid 2.0.4 → 2.0.5

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.
Files changed (2) hide show
  1. package/dmx-ag-grid.js +11 -3
  2. package/package.json +1 -1
package/dmx-ag-grid.js CHANGED
@@ -488,8 +488,16 @@ dmx.Component('ag-grid', {
488
488
  let exportToCSV = this.props.export_to_csv;
489
489
  let exportToPDF = this.props.export_to_pdf;
490
490
  let cellRenderer;
491
- const gridThemeClass = options.dark_mode ? `${options.grid_theme}-dark` : options.grid_theme;
492
- this.$node.innerHTML = `<div id=${options.id}-grid class="${gridThemeClass}"></div>`;
491
+
492
+ // Set up theme mode
493
+ this.$node.innerHTML = `<div id=${options.id}-grid class="${options.grid_theme}"></div>`;
494
+
495
+ // Apply theme mode using dark_mode attribute
496
+ const themeContainer = this.$node.querySelector(`#${options.id}-grid`);
497
+ if (themeContainer) {
498
+ themeContainer.dataset.agThemeMode = options.dark_mode ? 'dark' : 'light';
499
+ }
500
+
493
501
  let idFieldPresent = false;
494
502
  window.cellClickEvent = (columnName, value, idValue) => {
495
503
  this.set('fields', {"field": columnName, "data": value});
@@ -1089,7 +1097,7 @@ dmx.Component('ag-grid', {
1089
1097
  CustomTooltipComponent.prototype.getGui = function() {
1090
1098
  return this.eGui;
1091
1099
  };
1092
-
1100
+
1093
1101
  createCombinedTooltipValueGetter = (key, dataChanges, dataBindedChanges) => {
1094
1102
  const keyLookup = {};
1095
1103
  dataBindedChanges.forEach(change => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid v34 - Advanced data grid with enhanced editing, filtering, and tree data capabilities.",
6
6
  "license": "MIT",