@dmlibs/dm-cmps 0.1.10 → 0.1.11
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.
|
@@ -67,6 +67,7 @@ class DmCmpsDataSource {
|
|
|
67
67
|
value.toString().toLowerCase().includes(term.toLowerCase()));
|
|
68
68
|
};
|
|
69
69
|
if (this.speratedSearch) {
|
|
70
|
+
console.log('sperated search active !!!');
|
|
70
71
|
const terms = filter
|
|
71
72
|
.split(' ')
|
|
72
73
|
.map((t) => t.trim())
|
|
@@ -1587,6 +1588,7 @@ class DmTable {
|
|
|
1587
1588
|
this.datasource().setFilterPredicate(this._filterPredicate);
|
|
1588
1589
|
}
|
|
1589
1590
|
if (this.enableSperatedSearch()) {
|
|
1591
|
+
console.log('enableSperatedSearch');
|
|
1590
1592
|
this.datasource().applySperatedSearch(true);
|
|
1591
1593
|
}
|
|
1592
1594
|
if (this.enablePagination() || dataSource.length >= this.autoPaginationAboveRowsCount()) {
|
|
@@ -1680,13 +1682,20 @@ class DmTable {
|
|
|
1680
1682
|
return;
|
|
1681
1683
|
this.datasource().setFilterPredicate((row, filter) => {
|
|
1682
1684
|
const filterLower = filter.toLowerCase();
|
|
1683
|
-
|
|
1685
|
+
const match = (term) => this.runtimeColumns().some((col) => {
|
|
1686
|
+
if (col.type && ['actions', '$index', 'component', 'customHtml'].includes(col.type))
|
|
1687
|
+
return false;
|
|
1684
1688
|
const cellValue = this.resolveCellValue(row, col);
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1689
|
+
return cellValue != null && cellValue.toString().includes(term);
|
|
1690
|
+
});
|
|
1691
|
+
if (this.enableSperatedSearch()) {
|
|
1692
|
+
const terms = filterLower
|
|
1693
|
+
.split(' ')
|
|
1694
|
+
.map((term) => term.trim())
|
|
1695
|
+
.filter((term) => !!term);
|
|
1696
|
+
return terms.every((term) => match(term));
|
|
1688
1697
|
}
|
|
1689
|
-
return
|
|
1698
|
+
return match(filterLower);
|
|
1690
1699
|
});
|
|
1691
1700
|
}
|
|
1692
1701
|
createCellContext = (row, column) => ({
|