@monoui/vuejs 1.1.86 → 1.1.88
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/main.js +2 -2
- package/package.json +1 -1
- package/src/components/Table/Table.vue +16 -7
package/package.json
CHANGED
|
@@ -604,6 +604,11 @@ export default {
|
|
|
604
604
|
handler: function(newValue) {
|
|
605
605
|
if (!this.comingFromPopState) this.addFilter(newValue);
|
|
606
606
|
}
|
|
607
|
+
},
|
|
608
|
+
perPage: {
|
|
609
|
+
handler: function(newValue) {
|
|
610
|
+
this.settings.itemPerPage = newValue || 10;
|
|
611
|
+
}
|
|
607
612
|
}
|
|
608
613
|
},
|
|
609
614
|
data() {
|
|
@@ -616,7 +621,7 @@ export default {
|
|
|
616
621
|
},
|
|
617
622
|
tableData: [],
|
|
618
623
|
searchWord: null,
|
|
619
|
-
isDataEmpty:
|
|
624
|
+
isDataEmpty: true,
|
|
620
625
|
isLoading: false,
|
|
621
626
|
limit: 250,
|
|
622
627
|
searchDebounceTimeout: null,
|
|
@@ -636,13 +641,17 @@ export default {
|
|
|
636
641
|
},
|
|
637
642
|
computed: {
|
|
638
643
|
filteredPerPageValues() {
|
|
639
|
-
const
|
|
644
|
+
const valuesSet = new Set();
|
|
640
645
|
for (const value of this.perPageValues) {
|
|
641
646
|
if (value <= this.settings.totalItemCount) {
|
|
642
|
-
|
|
647
|
+
valuesSet.add(value);
|
|
643
648
|
}
|
|
644
649
|
}
|
|
645
|
-
|
|
650
|
+
// Include current itemPerPage if it's a custom value not in perPageValues
|
|
651
|
+
if (!this.perPageValues.includes(this.settings.itemPerPage)) {
|
|
652
|
+
valuesSet.add(this.settings.itemPerPage);
|
|
653
|
+
}
|
|
654
|
+
return Array.from(valuesSet).sort((a, b) => a - b);
|
|
646
655
|
},
|
|
647
656
|
itemPerPageText() {
|
|
648
657
|
if (
|
|
@@ -863,7 +872,7 @@ export default {
|
|
|
863
872
|
const splitted = key.split(".");
|
|
864
873
|
return splitted.reduce(
|
|
865
874
|
(obj, key) =>
|
|
866
|
-
obj && obj[key] !==
|
|
875
|
+
obj && obj[key] !== undefined ? obj[key] : undefined,
|
|
867
876
|
row
|
|
868
877
|
);
|
|
869
878
|
},
|
|
@@ -938,7 +947,7 @@ export default {
|
|
|
938
947
|
url = this.addHistoryParameter(
|
|
939
948
|
`f-${filter.Column}`,
|
|
940
949
|
filter.Value,
|
|
941
|
-
this.
|
|
950
|
+
this.historyStorage,
|
|
942
951
|
url,
|
|
943
952
|
false
|
|
944
953
|
);
|
|
@@ -948,7 +957,7 @@ export default {
|
|
|
948
957
|
url = this.addHistoryParameter(
|
|
949
958
|
`s-${sort.Column}`,
|
|
950
959
|
sort.Asc ? 1 : 0,
|
|
951
|
-
this.
|
|
960
|
+
this.historyStorage,
|
|
952
961
|
url,
|
|
953
962
|
false
|
|
954
963
|
);
|