mn-angular-lib 1.0.38 → 1.0.39
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.
|
@@ -4131,7 +4131,7 @@ class MnTable {
|
|
|
4131
4131
|
if (!this.dataSource.loadAdditionalRows || this.loadingMoreRows)
|
|
4132
4132
|
return;
|
|
4133
4133
|
this.loadingMoreRows = true;
|
|
4134
|
-
const promise = (this.searchValue.length > 0 && this.dataSource.searchForAdditionalItems)
|
|
4134
|
+
const promise = (this.searchValue && this.searchValue.length > 0 && this.dataSource.searchForAdditionalItems)
|
|
4135
4135
|
? this.dataSource.searchForAdditionalItems(this.searchValue)
|
|
4136
4136
|
: this.dataSource.loadAdditionalRows();
|
|
4137
4137
|
promise
|
|
@@ -4233,9 +4233,9 @@ class MnTable {
|
|
|
4233
4233
|
}
|
|
4234
4234
|
// ── Private ──
|
|
4235
4235
|
applyFilterAndSort(searchForItems) {
|
|
4236
|
-
let items = this.dataSource.dataRows.value;
|
|
4236
|
+
let items = this.dataSource.dataRows.value ?? [];
|
|
4237
4237
|
// Skip client-side search filtering when server handles it.
|
|
4238
|
-
if (!this.isServerSearched && this.dataSource.isInSearch && this.dataSource.canSearch && this.searchValue.length > 0) {
|
|
4238
|
+
if (!this.isServerSearched && this.dataSource.isInSearch && this.dataSource.canSearch && this.searchValue && this.searchValue.length > 0) {
|
|
4239
4239
|
const term = this.searchValue.toLowerCase();
|
|
4240
4240
|
items = items.filter(row => this.dataSource.isInSearch(row, term));
|
|
4241
4241
|
}
|