@appbaseio/reactivesearch-vue 1.35.2 → 1.35.4

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.
@@ -18960,12 +18960,23 @@
18960
18960
  this.updateQueryHandler(this.componentId, this.$data.currentValue, this.$props);
18961
18961
  }
18962
18962
  },
18963
+ isLoading: function isLoading(newVal) {
18964
+ if (newVal) {
18965
+ this.suggestions = [];
18966
+ }
18967
+ },
18963
18968
  suggestions: function suggestions(newVal) {
18969
+ if (this.isLoading) {
18970
+ this.normalizedSuggestions = [];
18971
+ return;
18972
+ }
18964
18973
  if (Array.isArray(newVal) && this.$data.currentValue.trim().length) {
18965
18974
  // shallow check allows us to set suggestions even if the next set
18966
18975
  // of suggestions are same as the current one
18967
18976
  this.$emit('suggestions', newVal);
18968
- this.normalizedSuggestions = this.onSuggestions(newVal);
18977
+ if (!isEqual$4(this.normalizedSuggestions, newVal)) {
18978
+ this.normalizedSuggestions = this.onSuggestions(newVal);
18979
+ }
18969
18980
  }
18970
18981
  },
18971
18982
  selectedValue: function selectedValue(newVal, oldVal) {
@@ -19099,9 +19110,7 @@
19099
19110
  return;
19100
19111
  }
19101
19112
  // Refresh recent searches when value becomes empty
19102
- if (!value && props.enableDefaultSuggestions === false) {
19103
- _this.resetStoreForComponent(props.componentId);
19104
- } else if (!value && _this.currentValue && _this.enableRecentSearches) {
19113
+ if (props.enableDefaultSuggestions && !value && _this.currentValue && _this.enableRecentSearches) {
19105
19114
  _this.getRecentSearches();
19106
19115
  }
19107
19116
  if (isTagsMode) {
@@ -19159,7 +19168,7 @@
19159
19168
  _this.$emit('suggestions', _this.suggestions);
19160
19169
  } else if (!value) {
19161
19170
  // reset suggestions
19162
- _this.suggestions = [];
19171
+ // this.suggestions = [];
19163
19172
  // invoke on suggestions
19164
19173
  _this.$emit('suggestions', _this.suggestions);
19165
19174
  }
@@ -19170,11 +19179,6 @@
19170
19179
  if (props === void 0) {
19171
19180
  props = this.$props;
19172
19181
  }
19173
- if (!value && props.enableDefaultSuggestions === false) {
19174
- // clear Component data from store
19175
- this.resetStoreForComponent(props.componentId);
19176
- return;
19177
- }
19178
19182
  var defaultQueryOptions;
19179
19183
  var query = DataSearch.defaultQuery(value, props);
19180
19184
  if (this.defaultQuery) {
@@ -34923,7 +34927,7 @@
34923
34927
  });
34924
34928
  }
34925
34929
 
34926
- var version = "1.35.2";
34930
+ var version = "1.35.4";
34927
34931
 
34928
34932
  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];
34929
34933
  function install (Vue) {