@duskmoon-dev/el-pro-data-grid 1.7.3 → 1.7.5
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/dist/cjs/index.js +10 -10
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/register.js +10 -11
- package/dist/cjs/register.js.map +2 -2
- package/dist/esm/index.js +10 -10
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/register.js +10 -10
- package/dist/esm/register.js.map +2 -2
- package/package.json +2 -2
package/dist/cjs/register.js
CHANGED
|
@@ -79,7 +79,6 @@ __export(exports_src, {
|
|
|
79
79
|
registerGridColumnGroup: () => registerGridColumnGroup,
|
|
80
80
|
registerProDataGrid: () => registerProDataGrid
|
|
81
81
|
});
|
|
82
|
-
module.exports = __toCommonJS(exports_src);
|
|
83
82
|
|
|
84
83
|
// src/pro-data-grid.ts
|
|
85
84
|
var import_el_base12 = require("@duskmoon-dev/el-base");
|
|
@@ -214,8 +213,8 @@ class SortEngine {
|
|
|
214
213
|
const valB = b[sortItem.field];
|
|
215
214
|
const isDesc = sortItem.direction === "desc";
|
|
216
215
|
if (column?.comparator) {
|
|
217
|
-
const
|
|
218
|
-
return isDesc ? -
|
|
216
|
+
const result = column.comparator(valA, valB, a, b, isDesc);
|
|
217
|
+
return isDesc ? -result : result;
|
|
219
218
|
}
|
|
220
219
|
let result;
|
|
221
220
|
if (valA == null && valB == null)
|
|
@@ -562,15 +561,15 @@ class SelectionManager {
|
|
|
562
561
|
const key = row[this.#rowKey];
|
|
563
562
|
if (this.#mode === "single") {
|
|
564
563
|
const wasSelected = this.#selectedKeys.has(key);
|
|
565
|
-
const
|
|
564
|
+
const removed = this.getSelectedRows(rows);
|
|
566
565
|
this.#selectedKeys.clear();
|
|
567
566
|
if (wasSelected) {
|
|
568
567
|
this.#lastSelectedIndex = null;
|
|
569
|
-
return { added: [], removed
|
|
568
|
+
return { added: [], removed };
|
|
570
569
|
}
|
|
571
570
|
this.#selectedKeys.add(key);
|
|
572
571
|
this.#lastSelectedIndex = rowIndex;
|
|
573
|
-
return { added: [row], removed
|
|
572
|
+
return { added: [row], removed };
|
|
574
573
|
}
|
|
575
574
|
if (shiftKey && this.#lastSelectedIndex !== null) {
|
|
576
575
|
return this.#rangeSelect(rowIndex, rows);
|
|
@@ -7221,18 +7220,18 @@ class ElDmProDataGrid extends import_el_base12.BaseElement {
|
|
|
7221
7220
|
} else {
|
|
7222
7221
|
wrapper.prepend(this.#quickFilterBar);
|
|
7223
7222
|
}
|
|
7224
|
-
const
|
|
7225
|
-
|
|
7223
|
+
const input = this.#quickFilterBar.querySelector("input");
|
|
7224
|
+
input.addEventListener("input", () => {
|
|
7226
7225
|
const debounceMs = this.filterDebounceMs ?? 300;
|
|
7227
7226
|
if (this.#quickFilterDebounceTimer)
|
|
7228
7227
|
clearTimeout(this.#quickFilterDebounceTimer);
|
|
7229
7228
|
this.#quickFilterDebounceTimer = setTimeout(() => {
|
|
7230
|
-
this.#quickFilter.text =
|
|
7229
|
+
this.#quickFilter.text = input.value;
|
|
7231
7230
|
this.#processData();
|
|
7232
7231
|
this.#renderRows();
|
|
7233
7232
|
this.#renderPagination();
|
|
7234
7233
|
this.#renderOverlays();
|
|
7235
|
-
this.emit("quick-filter-change", { text:
|
|
7234
|
+
this.emit("quick-filter-change", { text: input.value });
|
|
7236
7235
|
}, debounceMs);
|
|
7237
7236
|
});
|
|
7238
7237
|
}
|
|
@@ -7583,5 +7582,5 @@ function register() {
|
|
|
7583
7582
|
// src/register.ts
|
|
7584
7583
|
register();
|
|
7585
7584
|
|
|
7586
|
-
//# debugId=
|
|
7585
|
+
//# debugId=96906230C89C082664756E2164756E21
|
|
7587
7586
|
//# sourceMappingURL=register.js.map
|