@appbaseio/reactivesearch-vue 1.36.1 → 1.36.3

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.
@@ -6892,15 +6892,13 @@
6892
6892
  return function (dispatch) {
6893
6893
  dispatch(setRawData(componentId, null));
6894
6894
  dispatch(setCustomData(null, componentId));
6895
- dispatch(setPromotedResults([], componentId));
6896
- dispatch(setPopularSuggestions([], componentId));
6897
- dispatch(setDefaultPopularSuggestions([], componentId));
6898
6895
  dispatch((0, hits.updateAggs)(componentId, null));
6899
6896
  dispatch((0, hits.updateCompositeAggs)(componentId, {}));
6900
6897
  dispatch((0, hits.updateHits)(componentId, {
6901
6898
  hits: [],
6902
6899
  total: 0
6903
6900
  }, 0));
6901
+ dispatch(logQuery(componentId, null));
6904
6902
  };
6905
6903
  }
6906
6904
  function setLastUsedAppbaseQuery(query) {
@@ -18961,23 +18959,12 @@
18961
18959
  this.updateQueryHandler(this.componentId, this.$data.currentValue, this.$props);
18962
18960
  }
18963
18961
  },
18964
- isLoading: function isLoading(newVal) {
18965
- if (newVal) {
18966
- this.suggestions = [];
18967
- }
18968
- },
18969
18962
  suggestions: function suggestions(newVal) {
18970
- if (this.isLoading) {
18971
- this.normalizedSuggestions = [];
18972
- return;
18973
- }
18974
18963
  if (Array.isArray(newVal) && this.$data.currentValue.trim().length) {
18975
18964
  // shallow check allows us to set suggestions even if the next set
18976
18965
  // of suggestions are same as the current one
18977
18966
  this.$emit('suggestions', newVal);
18978
- if (!isEqual$4(this.normalizedSuggestions, newVal)) {
18979
- this.normalizedSuggestions = this.onSuggestions(newVal);
18980
- }
18967
+ this.normalizedSuggestions = this.onSuggestions(newVal);
18981
18968
  }
18982
18969
  },
18983
18970
  selectedValue: function selectedValue(newVal, oldVal) {
@@ -19110,8 +19097,9 @@
19110
19097
  if (isTagsMode && isEqual$4(value, _this.selectedTags)) {
19111
19098
  return;
19112
19099
  }
19113
- // Refresh recent searches when value becomes empty
19114
- if (props.enableDefaultSuggestions && !value && _this.currentValue && _this.enableRecentSearches) {
19100
+ if (!value && props.enableDefaultSuggestions === false) {
19101
+ _this.resetStoreForComponent(props.componentId);
19102
+ } else if (!value && _this.currentValue && _this.enableRecentSearches) {
19115
19103
  _this.getRecentSearches();
19116
19104
  }
19117
19105
  if (isTagsMode) {
@@ -19215,13 +19203,18 @@
19215
19203
  // Update calculated default query in store
19216
19204
  updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
19217
19205
  }
19218
- this.setQueryOptions(this.internalComponent, _extends({}, this.queryOptions, defaultQueryOptions), execute);
19219
- this.updateQuery({
19220
- componentId: this.internalComponent,
19221
- query: query,
19222
- value: value,
19223
- componentType: constants_1$1.dataSearch
19224
- }, execute);
19206
+ if (!value && props.enableDefaultSuggestions === false) {
19207
+ // clear Component data from store
19208
+ this.resetStoreForComponent(props.componentId);
19209
+ } else {
19210
+ this.setQueryOptions(this.internalComponent, _extends({}, this.queryOptions, defaultQueryOptions), execute);
19211
+ this.updateQuery({
19212
+ componentId: this.internalComponent,
19213
+ query: query,
19214
+ value: value,
19215
+ componentType: constants_1$1.dataSearch
19216
+ }, execute);
19217
+ }
19225
19218
  },
19226
19219
  updateQueryHandler: function updateQueryHandler(componentId, value, props) {
19227
19220
  var customQuery = props.customQuery,
@@ -34994,7 +34987,7 @@
34994
34987
  });
34995
34988
  }
34996
34989
 
34997
- var version = "1.36.1";
34990
+ var version = "1.36.3";
34998
34991
 
34999
34992
  var components$1 = [RLConnected, ResultCard, ResultList, ReactiveBase, DSConnected, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, RcConnected$2, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4];
35000
34993
  function install (Vue) {