@cdmx/wappler_ag_grid 0.9.8 → 1.0.0
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/README.md +3 -0
- package/app_connect/components.hjson +20 -0
- package/dmx-ag-grid.js +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -346,6 +346,9 @@ Specify the tooltip text for Button 10.
|
|
|
346
346
|
- This action allows you to pin one or more columns to the left side of the grid.
|
|
347
347
|
- It is useful when you want to freeze specific columns in place for easy reference, even as you scroll horizontally.
|
|
348
348
|
|
|
349
|
+
**Hide Columns**
|
|
350
|
+
- The "Hide Columns" feature allows you to selectively hide one or more columns.
|
|
351
|
+
|
|
349
352
|
**Import File Data**
|
|
350
353
|
- The "Import File Data" action allows to import data from CSV and XLSX files into the AG Grid. This action simplifies the process of populating the grid with external data sources.
|
|
351
354
|
- Key Features:
|
|
@@ -1895,6 +1895,26 @@
|
|
|
1895
1895
|
}
|
|
1896
1896
|
]
|
|
1897
1897
|
},
|
|
1898
|
+
{
|
|
1899
|
+
addTitle: 'hideColumnsInGrid',
|
|
1900
|
+
title: 'Hide Columns',
|
|
1901
|
+
name: 'hideColumns',
|
|
1902
|
+
icon: 'fa fa-lg fa-eye-slash',
|
|
1903
|
+
state: 'opened',
|
|
1904
|
+
help: 'Hide Columns',
|
|
1905
|
+
properties: [
|
|
1906
|
+
{
|
|
1907
|
+
group: 'Properties',
|
|
1908
|
+
variables: [
|
|
1909
|
+
{
|
|
1910
|
+
name: '1', optionName: '1', title: 'Column Name', type: 'text',
|
|
1911
|
+
dataBindings: true, defaultValue: '', required: true,
|
|
1912
|
+
help: 'Hide Columns'
|
|
1913
|
+
}
|
|
1914
|
+
]
|
|
1915
|
+
}
|
|
1916
|
+
]
|
|
1917
|
+
},
|
|
1898
1918
|
{
|
|
1899
1919
|
addTitle: 'importFileData',
|
|
1900
1920
|
title: 'Import File Data',
|
package/dmx-ag-grid.js
CHANGED
|
@@ -189,7 +189,6 @@ dmx.Component('ag-grid', {
|
|
|
189
189
|
const idValue = this.$node.querySelector('dmx-ag-grid > div')?.getAttribute('id') ?? 'Grid not found';
|
|
190
190
|
const currentPageUrl = window.location.origin + window.location.pathname;
|
|
191
191
|
const uniqueId = `${currentPageUrl}_${idValue}`;
|
|
192
|
-
console.log(uniqueId)
|
|
193
192
|
localStorage.removeItem(`columnState_${uniqueId}`);
|
|
194
193
|
let gridInstance = this.refreshGrid();
|
|
195
194
|
this.set('gridInstance', gridInstance);
|
|
@@ -198,6 +197,9 @@ dmx.Component('ag-grid', {
|
|
|
198
197
|
pinColumns: function (fieldId) {
|
|
199
198
|
pinColumnToLeft(fieldId);
|
|
200
199
|
},
|
|
200
|
+
hideColumns: function (fieldId) {
|
|
201
|
+
hideColumn(fieldId);
|
|
202
|
+
},
|
|
201
203
|
importFileData: async function (fieldId) {
|
|
202
204
|
await this.parseFileData(fieldId);
|
|
203
205
|
},
|
|
@@ -993,7 +995,7 @@ dmx.Component('ag-grid', {
|
|
|
993
995
|
headerCheckboxSelectionFilteredOnly: false,
|
|
994
996
|
headerName: '',
|
|
995
997
|
colId: 'checkboxColumn',
|
|
996
|
-
field: null,
|
|
998
|
+
field: null,
|
|
997
999
|
filter: '',
|
|
998
1000
|
checkboxSelection: true,
|
|
999
1001
|
showDisabledCheckboxes: true,
|
|
@@ -1182,6 +1184,9 @@ dmx.Component('ag-grid', {
|
|
|
1182
1184
|
const gridConfig = {
|
|
1183
1185
|
onGridReady: function (params) {
|
|
1184
1186
|
const columnApi = params.columnApi;
|
|
1187
|
+
hideColumn = (fieldToHide) => {
|
|
1188
|
+
columnApi.setColumnsVisible([fieldToHide], false);
|
|
1189
|
+
}
|
|
1185
1190
|
pinColumnToLeft = (fieldToPin) => {
|
|
1186
1191
|
const columnState = columnApi.getColumnState();
|
|
1187
1192
|
const columnIndex = columnState.findIndex(column => column.colId === fieldToPin);
|