@limetech/lime-elements 38.3.1 → 38.3.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/CHANGELOG.md +8 -0
- package/dist/cjs/limel-table.cjs.entry.js +11 -4
- package/dist/cjs/limel-table.cjs.entry.js.map +1 -1
- package/dist/collection/components/table/table.js +11 -4
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/esm/limel-table.entry.js +11 -4
- package/dist/esm/limel-table.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-f077bfca.entry.js → p-c923b97d.entry.js} +2 -2
- package/dist/lime-elements/p-c923b97d.entry.js.map +1 -0
- package/dist/types/components/table/table.d.ts +2 -0
- package/package.json +2 -2
- package/dist/lime-elements/p-f077bfca.entry.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [38.3.2](https://github.com/Lundalogik/lime-elements/compare/v38.3.1...v38.3.2) (2025-03-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **table:** apply new columns without a full init ([3a5e7ac](https://github.com/Lundalogik/lime-elements/commit/3a5e7ac394daa8c689797b71a321f3801b226d48)), closes [Lundalogik/crm-feature#4449](https://github.com/Lundalogik/crm-feature/issues/4449)
|
|
8
|
+
|
|
1
9
|
## [38.3.1](https://github.com/Lundalogik/lime-elements/compare/v38.3.0...v38.3.1) (2025-03-12)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -24312,6 +24312,7 @@ const Table = class {
|
|
|
24312
24312
|
this.changeColumns = index.createEvent(this, "changeColumns", 7);
|
|
24313
24313
|
this.select = index.createEvent(this, "select", 7);
|
|
24314
24314
|
this.selectAll = index.createEvent(this, "selectAll", 7);
|
|
24315
|
+
this.shouldSort = false;
|
|
24315
24316
|
this.getActiveRows = () => {
|
|
24316
24317
|
if (!this.tabulator) {
|
|
24317
24318
|
return [];
|
|
@@ -24369,6 +24370,7 @@ const Table = class {
|
|
|
24369
24370
|
this.selection = undefined;
|
|
24370
24371
|
this.handleDataSorting = this.handleDataSorting.bind(this);
|
|
24371
24372
|
this.handlePageLoaded = this.handlePageLoaded.bind(this);
|
|
24373
|
+
this.handleRenderComplete = this.handleRenderComplete.bind(this);
|
|
24372
24374
|
this.handleAjaxRequesting = this.handleAjaxRequesting.bind(this);
|
|
24373
24375
|
this.requestData = this.requestData.bind(this);
|
|
24374
24376
|
this.onClickRow = this.onClickRow.bind(this);
|
|
@@ -24441,9 +24443,8 @@ const Table = class {
|
|
|
24441
24443
|
if (this.areSameColumns(newColumns, oldColumnsInTable)) {
|
|
24442
24444
|
return;
|
|
24443
24445
|
}
|
|
24444
|
-
|
|
24445
|
-
|
|
24446
|
-
this.init();
|
|
24446
|
+
this.tabulator.setColumns(this.getColumnDefinitions());
|
|
24447
|
+
this.shouldSort = true;
|
|
24447
24448
|
}
|
|
24448
24449
|
updateAggregates(newAggregates, oldAggregates) {
|
|
24449
24450
|
if (!this.tabulator) {
|
|
@@ -24560,7 +24561,7 @@ const Table = class {
|
|
|
24560
24561
|
const ajaxOptions = this.getAjaxOptions();
|
|
24561
24562
|
const paginationOptions = this.getPaginationOptions();
|
|
24562
24563
|
const columnOptions = this.getColumnOptions();
|
|
24563
|
-
return Object.assign(Object.assign(Object.assign(Object.assign({ data: this.data, layout: mapLayout(this.layout), columns: this.getColumnDefinitions(), dataSorting: this.handleDataSorting, pageLoaded: this.handlePageLoaded }, ajaxOptions), paginationOptions), { rowClick: this.onClickRow, rowFormatter: this.formatRow, initialSort: this.getInitialSorting(), nestedFieldSeparator: false }), columnOptions);
|
|
24564
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({ data: this.data, layout: mapLayout(this.layout), columns: this.getColumnDefinitions(), dataSorting: this.handleDataSorting, pageLoaded: this.handlePageLoaded, renderComplete: this.handleRenderComplete }, ajaxOptions), paginationOptions), { rowClick: this.onClickRow, rowFormatter: this.formatRow, initialSort: this.getInitialSorting(), nestedFieldSeparator: false }), columnOptions);
|
|
24564
24565
|
}
|
|
24565
24566
|
getInitialSorting() {
|
|
24566
24567
|
if (this.currentSorting && this.currentSorting.length) {
|
|
@@ -24706,6 +24707,12 @@ const Table = class {
|
|
|
24706
24707
|
}
|
|
24707
24708
|
this.changePage.emit(page);
|
|
24708
24709
|
}
|
|
24710
|
+
handleRenderComplete() {
|
|
24711
|
+
if (this.tabulator && this.shouldSort) {
|
|
24712
|
+
this.shouldSort = false;
|
|
24713
|
+
this.tabulator.setSort(this.getColumnSorter(this.sorting));
|
|
24714
|
+
}
|
|
24715
|
+
}
|
|
24709
24716
|
onClickRow(_ev, row) {
|
|
24710
24717
|
if (typeof row.getPosition === 'undefined') {
|
|
24711
24718
|
// Not a data row, probably a CalcComponent
|