@bildvitta/quasar-ui-asteroid 2.23.0-beta.6 → 2.23.0-beta.7
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/package.json
CHANGED
|
@@ -31,9 +31,11 @@ export default {
|
|
|
31
31
|
isScrolling: false,
|
|
32
32
|
pagination: {
|
|
33
33
|
page: 1,
|
|
34
|
-
lastPage: null
|
|
34
|
+
lastPage: null,
|
|
35
|
+
hasCount: true,
|
|
36
|
+
hasNextPage: false
|
|
35
37
|
},
|
|
36
|
-
search:
|
|
38
|
+
search: ''
|
|
37
39
|
}
|
|
38
40
|
},
|
|
39
41
|
|
|
@@ -69,7 +71,7 @@ export default {
|
|
|
69
71
|
handler (value, oldValue) {
|
|
70
72
|
if (isEqual(value, oldValue)) return
|
|
71
73
|
|
|
72
|
-
this.$
|
|
74
|
+
this.$_filterOptionsByStore('')
|
|
73
75
|
this.$emit('input', '')
|
|
74
76
|
}
|
|
75
77
|
}
|
|
@@ -86,7 +88,9 @@ export default {
|
|
|
86
88
|
this.search = search
|
|
87
89
|
this.pagination = {
|
|
88
90
|
page: 1,
|
|
89
|
-
lastPage: null
|
|
91
|
+
lastPage: null,
|
|
92
|
+
hasCount: true,
|
|
93
|
+
hasNextPage: false
|
|
90
94
|
}
|
|
91
95
|
},
|
|
92
96
|
|
|
@@ -137,11 +141,14 @@ export default {
|
|
|
137
141
|
}
|
|
138
142
|
})
|
|
139
143
|
|
|
140
|
-
const { results, count } = data
|
|
144
|
+
const { results, count, hasNextPage } = data
|
|
145
|
+
const hasCount = count !== undefined
|
|
141
146
|
|
|
142
147
|
this.pagination = {
|
|
143
148
|
page: this.pagination.page + 1,
|
|
144
|
-
lastPage: Math.ceil(count / params.limit)
|
|
149
|
+
lastPage: hasCount ? Math.ceil(count / params.limit) : null,
|
|
150
|
+
hasCount,
|
|
151
|
+
hasNextPage
|
|
145
152
|
}
|
|
146
153
|
|
|
147
154
|
this.$emit('fetch-options-success', data)
|
|
@@ -166,8 +173,8 @@ export default {
|
|
|
166
173
|
},
|
|
167
174
|
|
|
168
175
|
$_canFetchOptions () {
|
|
169
|
-
const { lastPage, page } = this.pagination
|
|
170
|
-
const hasMorePages = lastPage && page <= lastPage
|
|
176
|
+
const { lastPage, page, hasCount, hasNextPage } = this.pagination
|
|
177
|
+
const hasMorePages = hasCount ? lastPage && page <= lastPage : hasNextPage
|
|
171
178
|
|
|
172
179
|
return hasMorePages && !this.isLoading && !this.isScrolling && this.useLazyLoading
|
|
173
180
|
},
|