@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phoenix-cg/v-filters",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -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 && !this.initializedEmitted) {
336
+ if (showResult) {
336
337
  this.showResult()
337
338
  } else {
338
339
  this.requestCount()