@cdmx/wappler_ag_grid 1.5.5 → 1.5.7

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 +6 -4
  2. package/package.json +1 -1
package/dmx-ag-grid.js CHANGED
@@ -501,7 +501,8 @@ dmx.Component('ag-grid', {
501
501
  const buttons = params.buttons || defaultButtons;
502
502
  // Create a new container element to hold the buttons
503
503
  const container = document.createElement('div');
504
-
504
+ container.style.display = 'flex';
505
+ container.style.flexWrap = 'wrap';
505
506
  buttons.forEach((buttonConfig) => {
506
507
  const button = document.createElement('button');
507
508
  button.classList.add('btn');
@@ -767,7 +768,7 @@ dmx.Component('ag-grid', {
767
768
  const matchingType = ctypes.find((ct) => ct.field === key);
768
769
  return matchingType ? matchingType.type : null;
769
770
  }
770
- function detectDataType(values) {
771
+ function detectDataType(values) {
771
772
  let hasDate = false;
772
773
  let hasNumber = false;
773
774
  let hasText = false;
@@ -778,7 +779,7 @@ dmx.Component('ag-grid', {
778
779
  } else if (!isNaN(Number(value)) && !(typeof value === "string")) {
779
780
  hasNumber = true;
780
781
  } else if (((new Date(value)).getTime() > 0) && (value.includes('-') || value.includes('/'))) {
781
- hasDate = true;
782
+ hasDate = true;
782
783
  } else {
783
784
  hasText = true;
784
785
  }
@@ -955,7 +956,7 @@ dmx.Component('ag-grid', {
955
956
  // Assuming rowData is an array of objects
956
957
  const values = rowData.map(row => row[key]);
957
958
  const nonNullValues = values.filter(value => value !== null);
958
- const dataType = (ctypes.length>0 ? getCustomDataTypes(key) : detectDataType(nonNullValues));
959
+ const dataType = (ctypes.length > 0 && getCustomDataTypes(key) !== null) ? getCustomDataTypes(key) : detectDataType(nonNullValues);
959
960
  let filter;
960
961
  let valueGetter;
961
962
  let filterValueGetter;
@@ -1196,6 +1197,7 @@ dmx.Component('ag-grid', {
1196
1197
  cellRenderer: actionsRendererForPinnedBottom,
1197
1198
  minWidth: options.actions_column_min_width,
1198
1199
  maxWidth: options.actions_column_max_width,
1200
+ autoHeight: true,
1199
1201
  pinned: (options.pin_actions ? options.actions_column_position: undefined),
1200
1202
  cellRendererParams: {
1201
1203
  buttons: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.5.5",
3
+ "version": "1.5.7",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",