@limetech/lime-elements 37.52.6 → 37.52.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [37.52.7](https://github.com/Lundalogik/lime-elements/compare/v37.52.6...v37.52.7) (2024-06-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **table:** apply correct sorting ([2771aea](https://github.com/Lundalogik/lime-elements/commit/2771aeaf5631cdaa47ce99f53a4ce68e68a19a2a))
8
+
1
9
  ## [37.52.6](https://github.com/Lundalogik/lime-elements/compare/v37.52.5...v37.52.6) (2024-06-20)
2
10
 
3
11
 
@@ -24375,12 +24375,16 @@ const Table = class {
24375
24375
  (_a = this.tabulator) === null || _a === void 0 ? void 0 : _a.setMaxPage(this.calculatePageCount());
24376
24376
  }
24377
24377
  getOptions() {
24378
- var _a;
24379
24378
  const ajaxOptions = this.getAjaxOptions();
24380
24379
  const paginationOptions = this.getPaginationOptions();
24381
24380
  const columnOptions = this.getColumnOptions();
24382
- const initialSorting = (_a = this.currentSorting) !== null && _a !== void 0 ? _a : this.sorting;
24383
- 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.getColumnSorter(initialSorting), nestedFieldSeparator: false }), columnOptions);
24381
+ 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);
24382
+ }
24383
+ getInitialSorting() {
24384
+ if (this.currentSorting && this.currentSorting.length) {
24385
+ return this.getColumnSorter(this.currentSorting);
24386
+ }
24387
+ return this.getColumnSorter(this.sorting);
24384
24388
  }
24385
24389
  getColumnSorter(sorting) {
24386
24390
  return sorting.map((sorter) => {