@zeedhi/teknisa-components-vuetify 1.41.0 → 1.42.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.
|
@@ -4547,35 +4547,37 @@ let TekGridLayoutOptions = class TekGridLayoutOptions extends ZdComponentRender
|
|
|
4547
4547
|
const oldFilter = JSON.stringify(grid.datasource.filter);
|
|
4548
4548
|
const oldDynamicFilter = JSON.stringify(this.datasourceDynamicFilter(grid.datasource));
|
|
4549
4549
|
if (layout) {
|
|
4550
|
-
tableElement.style.width = layout.gridWidth;
|
|
4550
|
+
tableElement.style.width = layout.gridWidth || 'auto';
|
|
4551
4551
|
grid.datasource.order = layout.order !== undefined ? layout.order : grid.datasource.order;
|
|
4552
4552
|
grid.datasource.filter = layout.filter !== undefined ? layout.filter : grid.datasource.filter;
|
|
4553
4553
|
if (grid.datasource instanceof TekRestDatasource && layout.dynamicFilter !== undefined) {
|
|
4554
|
-
grid.datasource.dynamicFilter = this.getHelperValues(layout.dynamicFilter, layout.columns);
|
|
4554
|
+
grid.datasource.dynamicFilter = this.getHelperValues(layout.dynamicFilter, layout.columns || grid.columns);
|
|
4555
4555
|
}
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
// wait to change column orders
|
|
4571
|
-
this.$nextTick(() => {
|
|
4572
|
-
grid.columns.forEach((_column, index) => {
|
|
4573
|
-
const columnElement = tableElement.querySelector(`tr th:not(.selectable)[index="${index}"]`);
|
|
4574
|
-
if (columnElement) {
|
|
4575
|
-
columnElement.style.width = layout.columns[index].width || 'unset';
|
|
4576
|
-
}
|
|
4556
|
+
if (layout.columns) {
|
|
4557
|
+
grid.columns = layout.columns.map((column) => {
|
|
4558
|
+
const col = gridColumns[column.name];
|
|
4559
|
+
col.label = column.label !== undefined ? column.label : col.label;
|
|
4560
|
+
col.align = column.align !== undefined ? column.align : col.align;
|
|
4561
|
+
col.isVisible = column.isVisible !== undefined ? column.isVisible : col.isVisible;
|
|
4562
|
+
col.fixed = !!column.fixed;
|
|
4563
|
+
col.grouped = !!column.grouped;
|
|
4564
|
+
col.groupOpened = !!column.groupOpened;
|
|
4565
|
+
col.aggregation = column.aggregation;
|
|
4566
|
+
col.minWidth = column.minWidth || '';
|
|
4567
|
+
col.maxWidth = column.maxWidth || '';
|
|
4568
|
+
this.setHelperValue(col, column.filterHelperValue || '');
|
|
4569
|
+
return col;
|
|
4577
4570
|
});
|
|
4578
|
-
|
|
4571
|
+
// wait to change column orders
|
|
4572
|
+
this.$nextTick(() => {
|
|
4573
|
+
grid.columns.forEach((_column, index) => {
|
|
4574
|
+
const columnElement = tableElement.querySelector(`tr th:not(.selectable)[index="${index}"]`);
|
|
4575
|
+
if (columnElement) {
|
|
4576
|
+
columnElement.style.width = layout.columns[index].width || 'unset';
|
|
4577
|
+
}
|
|
4578
|
+
});
|
|
4579
|
+
});
|
|
4580
|
+
}
|
|
4579
4581
|
}
|
|
4580
4582
|
else {
|
|
4581
4583
|
grid.datasource.order = [...this.instance.originalDatasourceOrder];
|
|
@@ -4550,35 +4550,37 @@
|
|
|
4550
4550
|
const oldFilter = JSON.stringify(grid.datasource.filter);
|
|
4551
4551
|
const oldDynamicFilter = JSON.stringify(this.datasourceDynamicFilter(grid.datasource));
|
|
4552
4552
|
if (layout) {
|
|
4553
|
-
tableElement.style.width = layout.gridWidth;
|
|
4553
|
+
tableElement.style.width = layout.gridWidth || 'auto';
|
|
4554
4554
|
grid.datasource.order = layout.order !== undefined ? layout.order : grid.datasource.order;
|
|
4555
4555
|
grid.datasource.filter = layout.filter !== undefined ? layout.filter : grid.datasource.filter;
|
|
4556
4556
|
if (grid.datasource instanceof teknisaComponentsCommon.TekRestDatasource && layout.dynamicFilter !== undefined) {
|
|
4557
|
-
grid.datasource.dynamicFilter = this.getHelperValues(layout.dynamicFilter, layout.columns);
|
|
4557
|
+
grid.datasource.dynamicFilter = this.getHelperValues(layout.dynamicFilter, layout.columns || grid.columns);
|
|
4558
4558
|
}
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
// wait to change column orders
|
|
4574
|
-
this.$nextTick(() => {
|
|
4575
|
-
grid.columns.forEach((_column, index) => {
|
|
4576
|
-
const columnElement = tableElement.querySelector(`tr th:not(.selectable)[index="${index}"]`);
|
|
4577
|
-
if (columnElement) {
|
|
4578
|
-
columnElement.style.width = layout.columns[index].width || 'unset';
|
|
4579
|
-
}
|
|
4559
|
+
if (layout.columns) {
|
|
4560
|
+
grid.columns = layout.columns.map((column) => {
|
|
4561
|
+
const col = gridColumns[column.name];
|
|
4562
|
+
col.label = column.label !== undefined ? column.label : col.label;
|
|
4563
|
+
col.align = column.align !== undefined ? column.align : col.align;
|
|
4564
|
+
col.isVisible = column.isVisible !== undefined ? column.isVisible : col.isVisible;
|
|
4565
|
+
col.fixed = !!column.fixed;
|
|
4566
|
+
col.grouped = !!column.grouped;
|
|
4567
|
+
col.groupOpened = !!column.groupOpened;
|
|
4568
|
+
col.aggregation = column.aggregation;
|
|
4569
|
+
col.minWidth = column.minWidth || '';
|
|
4570
|
+
col.maxWidth = column.maxWidth || '';
|
|
4571
|
+
this.setHelperValue(col, column.filterHelperValue || '');
|
|
4572
|
+
return col;
|
|
4580
4573
|
});
|
|
4581
|
-
|
|
4574
|
+
// wait to change column orders
|
|
4575
|
+
this.$nextTick(() => {
|
|
4576
|
+
grid.columns.forEach((_column, index) => {
|
|
4577
|
+
const columnElement = tableElement.querySelector(`tr th:not(.selectable)[index="${index}"]`);
|
|
4578
|
+
if (columnElement) {
|
|
4579
|
+
columnElement.style.width = layout.columns[index].width || 'unset';
|
|
4580
|
+
}
|
|
4581
|
+
});
|
|
4582
|
+
});
|
|
4583
|
+
}
|
|
4582
4584
|
}
|
|
4583
4585
|
else {
|
|
4584
4586
|
grid.datasource.order = [...this.instance.originalDatasourceOrder];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/teknisa-components-vuetify",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.42.0",
|
|
4
4
|
"description": "Teknisa Components based on Vuetify",
|
|
5
5
|
"author": "Zeedhi <zeedhi@teknisa.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"vue": "^2.6.12",
|
|
40
40
|
"vuetify": "^2.4.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "ae7f292e78e052ab64f9d03afb7a5470d1f2e097"
|
|
43
43
|
}
|