@firestitch/filter 13.0.1 → 13.0.2

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.
@@ -129,6 +129,7 @@ class BaseItem {
129
129
  this._filter = _filter;
130
130
  this._pendingValues = false;
131
131
  this._pendingDefaultValue = false;
132
+ this._initializedValues = false;
132
133
  this._loading$ = new BehaviorSubject(false);
133
134
  this._value$ = new BehaviorSubject(null);
134
135
  this._valueChange$ = new Subject();
@@ -141,7 +142,6 @@ class BaseItem {
141
142
  get filter() {
142
143
  return this._filter;
143
144
  }
144
- ///
145
145
  get isTypeAutocomplete() {
146
146
  return this.type === ItemType.AutoComplete;
147
147
  }
@@ -175,7 +175,6 @@ class BaseItem {
175
175
  get isTypeKeyword() {
176
176
  return this.type === ItemType.Keyword;
177
177
  }
178
- ////
179
178
  get isChipVisible() {
180
179
  return !!this.model;
181
180
  }
@@ -229,7 +228,7 @@ class BaseItem {
229
228
  this._loading$.next(value);
230
229
  }
231
230
  get _initialized() {
232
- return !this._pendingDefaultValue && !this._pendingValues;
231
+ return !this._pendingDefaultValue && !this._pendingValues && this._initializedValues;
233
232
  }
234
233
  valueChanged() {
235
234
  this._value$.next(this.value);
@@ -266,7 +265,7 @@ class BaseItem {
266
265
  }));
267
266
  }
268
267
  initValues(persistedValue) {
269
- // this._initialized = false;
268
+ this._initializedValues = false;
270
269
  this.persistedValue = persistedValue;
271
270
  this._initDefaultModel();
272
271
  const isAutocomplete = this.type === ItemType.AutoComplete || this.type === ItemType.AutoCompleteChips;
@@ -277,14 +276,13 @@ class BaseItem {
277
276
  }
278
277
  else {
279
278
  this.values = valuesResult;
280
- // Move to some other place
281
279
  this._init();
282
- // this._initialized = true;
280
+ this._initializedValues = true;
283
281
  }
284
282
  }
285
283
  else {
286
284
  this._init();
287
- // this._initialized = true;
285
+ this._initializedValues = true;
288
286
  }
289
287
  }
290
288
  loadAsyncValues(reload = true) {
@@ -298,7 +296,7 @@ class BaseItem {
298
296
  this.loading = false;
299
297
  this._init();
300
298
  this._validateModel();
301
- // this._initialized = true;
299
+ this._initializedValues = true;
302
300
  });
303
301
  }
304
302
  }