@nethserver/ns8-ui-lib 0.1.20 → 0.1.21

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.
@@ -17391,6 +17391,12 @@ var script$8 = {
17391
17391
  type: String,
17392
17392
  default: "Try changing your search query"
17393
17393
  },
17394
+ filterRowsCallback: {
17395
+ type: Function
17396
+ },
17397
+ customSortTable: {
17398
+ type: Function
17399
+ },
17394
17400
  // default value of following props is defined in NsPagination
17395
17401
  itemsPerPageLabel: {
17396
17402
  type: String,
@@ -17415,9 +17421,6 @@ var script$8 = {
17415
17421
  pageNumberLabel: {
17416
17422
  type: String,
17417
17423
  default: undefined
17418
- },
17419
- filterRowsCallback: {
17420
- type: Function
17421
17424
  }
17422
17425
  },
17423
17426
 
@@ -17574,6 +17577,14 @@ var script$8 = {
17574
17577
  }
17575
17578
 
17576
17579
  const propertyToSort = this.rawColumns[ev.index];
17580
+
17581
+ if (this.customSortTable) {
17582
+ // call custom sort function
17583
+ this.filteredRows.sort(this.customSortTable(propertyToSort));
17584
+ } else {
17585
+ this.filteredRows.sort(this.sortByProperty(propertyToSort));
17586
+ }
17587
+
17577
17588
  this.filteredRows.sort(this.sortByProperty(propertyToSort));
17578
17589
 
17579
17590
  if (ev.order === "descending") {