@firestitch/filter 9.9.0 → 9.9.1

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.
@@ -68,7 +68,7 @@ function findValue(values, value, children) {
68
68
  var BaseItem = /** @class */ (function () {
69
69
  function BaseItem(itemConfig, _additionalConfig) {
70
70
  this._additionalConfig = _additionalConfig;
71
- this._initialized = false;
71
+ // protected _initialized = false;
72
72
  this._pendingValues = false;
73
73
  this._pendingDefaultValue = false;
74
74
  this._loading$ = new BehaviorSubject(false);
@@ -267,6 +267,13 @@ var BaseItem = /** @class */ (function () {
267
267
  enumerable: true,
268
268
  configurable: true
269
269
  });
270
+ Object.defineProperty(BaseItem.prototype, "_initialized", {
271
+ get: function () {
272
+ return !this._pendingDefaultValue && !this._pendingValues;
273
+ },
274
+ enumerable: true,
275
+ configurable: true
276
+ });
270
277
  BaseItem.prototype.valueChanged = function () {
271
278
  this._value$.next(this.value);
272
279
  if (this.change) {
@@ -304,12 +311,13 @@ var BaseItem = /** @class */ (function () {
304
311
  return this.defaultValueFn()
305
312
  .pipe(tap(function (value) {
306
313
  _this.defaultValue = value;
314
+ _this._initDefaultModel();
307
315
  }), finalize(function () {
308
316
  _this._pendingDefaultValue = false;
309
317
  }));
310
318
  };
311
319
  BaseItem.prototype.initValues = function (persistedValue) {
312
- this._initialized = false;
320
+ // this._initialized = false;
313
321
  this.persistedValue = persistedValue;
314
322
  this._initDefaultModel();
315
323
  var isAutocomplete = this.type === ItemType.AutoComplete || this.type === ItemType.AutoCompleteChips;
@@ -322,12 +330,12 @@ var BaseItem = /** @class */ (function () {
322
330
  this.values = valuesResult;
323
331
  // Move to some other place
324
332
  this._init();
325
- this._initialized = true;
333
+ // this._initialized = true;
326
334
  }
327
335
  }
328
336
  else {
329
337
  this._init();
330
- this._initialized = true;
338
+ // this._initialized = true;
331
339
  }
332
340
  };
333
341
  BaseItem.prototype.loadAsyncValues = function (reload) {
@@ -343,7 +351,7 @@ var BaseItem = /** @class */ (function () {
343
351
  _this.loading = false;
344
352
  _this._init();
345
353
  _this._validateModel();
346
- _this._initialized = true;
354
+ // this._initialized = true;
347
355
  });
348
356
  }
349
357
  };