@phoenix-cg/v-filters 0.2.13 → 0.2.14
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/v-filters.common.js +14 -8
- package/dist/v-filters.common.js.map +1 -1
- package/dist/v-filters.umd.js +14 -8
- package/dist/v-filters.umd.js.map +1 -1
- package/dist/v-filters.umd.min.js +1 -1
- package/dist/v-filters.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VFilters.vue +7 -6
package/package.json
CHANGED
|
@@ -293,20 +293,21 @@ export default {
|
|
|
293
293
|
this.$set(this.filters, field._name, value)
|
|
294
294
|
})
|
|
295
295
|
this.inited = true
|
|
296
|
-
if (!isUpdate) {
|
|
296
|
+
if (!isUpdate && this.initializedEmitted ) {
|
|
297
|
+
this.setUrlParams()
|
|
298
|
+
this.doAction(true)
|
|
299
|
+
}
|
|
300
|
+
if (!this.initializedEmitted ) {
|
|
297
301
|
this.setUrlParams(false, this.getInitialFlatFilters())
|
|
298
302
|
this.$emit('fields-initialized', this.getInitialFlatFilters())
|
|
299
303
|
this.initializedEmitted = true
|
|
300
|
-
} else {
|
|
301
|
-
this.setUrlParams()
|
|
302
|
-
this.doAction(true)
|
|
303
304
|
}
|
|
304
305
|
},
|
|
305
306
|
getInitialFlatFilters () {
|
|
306
307
|
const filters = { ...this.filterParamsToInclude }
|
|
307
308
|
this.fields.forEach(field => {
|
|
308
309
|
const value = this.filters[field._name]
|
|
309
|
-
if (!value) return
|
|
310
|
+
if (!value || !value._id) { return }
|
|
310
311
|
filters[field._name] = [value._id]
|
|
311
312
|
})
|
|
312
313
|
return filters
|
|
@@ -332,7 +333,7 @@ export default {
|
|
|
332
333
|
this.editedFields = this.editedFields.filter(field => !toRemove.includes(field))
|
|
333
334
|
},
|
|
334
335
|
doAction (showResult = false) {
|
|
335
|
-
if (showResult
|
|
336
|
+
if (showResult) {
|
|
336
337
|
this.showResult()
|
|
337
338
|
} else {
|
|
338
339
|
this.requestCount()
|