@fluid-topics/ft-filterable-table 2.2.17 → 2.2.19
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.
|
@@ -136,11 +136,12 @@ export class FtFilterableTable extends FtLitElement {
|
|
|
136
136
|
const isSorted = this.currentSort && this.currentSort.column === index;
|
|
137
137
|
const sortIcon = isSorted ? (this.currentSort.order === "asc" ? "expand_less" : "expand_more") : "unfold_more";
|
|
138
138
|
const sort = () => {
|
|
139
|
-
var _a
|
|
140
|
-
|
|
139
|
+
var _a;
|
|
140
|
+
var _b;
|
|
141
|
+
const defaultSort = (_b = column.defaultSortOrder) !== null && _b !== void 0 ? _b : "asc";
|
|
141
142
|
this.currentSort = {
|
|
142
143
|
column: index,
|
|
143
|
-
order: isSorted && ((
|
|
144
|
+
order: isSorted && ((_a = this.currentSort) === null || _a === void 0 ? void 0 : _a.order) === defaultSort ? this.getOppositeSortOrder(defaultSort) : defaultSort,
|
|
144
145
|
};
|
|
145
146
|
this.dispatchChangeEvent();
|
|
146
147
|
};
|