@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.
@@ -6036,7 +6036,7 @@ if (typeof window !== 'undefined') {
6036
6036
  // Indicate to webpack that this file can be concatenated
6037
6037
  /* harmony default export */ var setPublicPath = (null);
6038
6038
 
6039
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"22714775-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VFilters.vue?vue&type=template&id=2e9a703a&
6039
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"22714775-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VFilters.vue?vue&type=template&id=02ebe153&
6040
6040
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"v-filters"},[_c('div',{staticClass:"v-filters_fields"},[_vm._t("before-fields"),_vm._l((_vm.fields),function(field){return _c(_vm.fieldComponentName,{key:field._name,tag:"component",class:[("__" + (field._name))],attrs:{"title":field.title}},[_c(_vm.componentsMap[field._type],_vm._b({key:_vm.fieldKey,tag:"component",on:{"input":function($event){return _vm.handleFieldChange(field._name, $event)}},model:{value:(_vm.filters[field._name]),callback:function ($$v) {_vm.$set(_vm.filters, field._name, $$v)},expression:"filters[field._name]"}},'component',_vm.getFieldProps(field),false))],1)}),_vm._t("after-fields"),_vm._t("actions",[_c(_vm.fieldComponentName,{tag:"component"},[(!_vm.immediate)?_c('button',{staticClass:"v-button v-filters_button",on:{"click":_vm.showResult}},[_vm._v(" "+_vm._s(_vm.actionTitle)+" ")]):_vm._e(),(_vm.edited)?_c('button',{staticClass:"v-button v-filters_button __reset",on:{"click":_vm.resetFilters}},[_vm._v(" Сбросить параметры ")]):_vm._e()])],null,{
6041
6041
  showResult: _vm.showResult,
6042
6042
  resetFilters: _vm.resetFilters,
@@ -6053,7 +6053,7 @@ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._sel
6053
6053
  var staticRenderFns = []
6054
6054
 
6055
6055
 
6056
- // CONCATENATED MODULE: ./src/components/VFilters.vue?vue&type=template&id=2e9a703a&
6056
+ // CONCATENATED MODULE: ./src/components/VFilters.vue?vue&type=template&id=02ebe153&
6057
6057
 
6058
6058
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
6059
6059
  var es_promise = __webpack_require__("e6cf");
@@ -7215,13 +7215,15 @@ var VFiltersvue_type_script_lang_js_unserialize = function unserialize(input) {
7215
7215
  });
7216
7216
  this.inited = true;
7217
7217
 
7218
- if (!isUpdate) {
7218
+ if (!isUpdate && this.initializedEmitted) {
7219
+ this.setUrlParams();
7220
+ this.doAction(true);
7221
+ }
7222
+
7223
+ if (!this.initializedEmitted) {
7219
7224
  this.setUrlParams(false, this.getInitialFlatFilters());
7220
7225
  this.$emit('fields-initialized', this.getInitialFlatFilters());
7221
7226
  this.initializedEmitted = true;
7222
- } else {
7223
- this.setUrlParams();
7224
- this.doAction(true);
7225
7227
  }
7226
7228
  },
7227
7229
  getInitialFlatFilters: function getInitialFlatFilters() {
@@ -7231,7 +7233,11 @@ var VFiltersvue_type_script_lang_js_unserialize = function unserialize(input) {
7231
7233
 
7232
7234
  this.fields.forEach(function (field) {
7233
7235
  var value = _this3.filters[field._name];
7234
- if (!value) return;
7236
+
7237
+ if (!value || !value._id) {
7238
+ return;
7239
+ }
7240
+
7235
7241
  filters[field._name] = [value._id];
7236
7242
  });
7237
7243
  return filters;
@@ -7285,7 +7291,7 @@ var VFiltersvue_type_script_lang_js_unserialize = function unserialize(input) {
7285
7291
  doAction: function doAction() {
7286
7292
  var showResult = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
7287
7293
 
7288
- if (showResult && !this.initializedEmitted) {
7294
+ if (showResult) {
7289
7295
  this.showResult();
7290
7296
  } else {
7291
7297
  this.requestCount();