@nethserver/ns8-ui-lib 0.0.97 → 0.1.0
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/ns8-ui-lib.esm.js +4723 -434
- package/dist/ns8-ui-lib.min.js +1 -1
- package/dist/ns8-ui-lib.ssr.js +4058 -420
- package/package.json +1 -1
- package/src/lib-components/NsCheckbox.vue +113 -0
- package/src/lib-components/NsComboBox.vue +579 -0
- package/src/lib-components/NsDataTable.vue +12 -3
- package/src/lib-components/NsMultiSelect.vue +722 -0
- package/src/lib-components/NsTag.vue +55 -0
- package/src/lib-components/NsTextInput.vue +8 -6
|
@@ -380,6 +380,7 @@ export default {
|
|
|
380
380
|
backwardText: { type: String, default: undefined },
|
|
381
381
|
forwardText: { type: String, default: undefined },
|
|
382
382
|
pageNumberLabel: { type: String, default: undefined },
|
|
383
|
+
filterRowsCallback: { type: Function }
|
|
383
384
|
},
|
|
384
385
|
data() {
|
|
385
386
|
return {
|
|
@@ -455,9 +456,17 @@ export default {
|
|
|
455
456
|
}
|
|
456
457
|
},
|
|
457
458
|
filterRows() {
|
|
459
|
+
if (this.filterRowsCallback) {
|
|
460
|
+
// call custom filterRows function
|
|
461
|
+
this.filteredRows = this.filterRowsCallback(this.searchFilter);
|
|
462
|
+
} else {
|
|
463
|
+
this.filteredRows = this.defaultFilterRows();
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
defaultFilterRows() {
|
|
458
467
|
if (!this.searchFilter) {
|
|
459
|
-
|
|
460
|
-
} else
|
|
468
|
+
return this.allRows;
|
|
469
|
+
} else {
|
|
461
470
|
// clean query
|
|
462
471
|
const cleanRegex = /[^a-zA-Z0-9]/g;
|
|
463
472
|
const queryText = this.searchFilter.replace(cleanRegex, "");
|
|
@@ -486,7 +495,7 @@ export default {
|
|
|
486
495
|
}
|
|
487
496
|
});
|
|
488
497
|
}, this);
|
|
489
|
-
|
|
498
|
+
return searchResults;
|
|
490
499
|
}
|
|
491
500
|
},
|
|
492
501
|
paginateTable(ev) {
|