@dereekb/dbx-form 9.20.3 → 9.20.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.
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.directive.mjs +10 -2
- package/fesm2015/dereekb-dbx-form.mjs +8 -0
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form.mjs +8 -0
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/formly/field/selection/pickable/pickable.field.directive.d.ts +6 -0
- package/mapbox/package.json +4 -4
- package/package.json +4 -4
|
@@ -1619,6 +1619,7 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1619
1619
|
this.inputCtrl = new FormControl('');
|
|
1620
1620
|
this._formControlObs = new BehaviorSubject(undefined);
|
|
1621
1621
|
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
1622
|
+
this._clearDisplayHashMapSub = new SubscriptionObject();
|
|
1622
1623
|
this._displayHashMap = new BehaviorSubject(new Map());
|
|
1623
1624
|
this.filterInputValue$ = this.inputCtrl.valueChanges.pipe(startWith(undefined));
|
|
1624
1625
|
this.filterInputValueString$ = this.filterInputValue$.pipe(debounceTime(200), distinctUntilChanged(), shareReplay(1));
|
|
@@ -1766,6 +1767,9 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1766
1767
|
get footerConfig() {
|
|
1767
1768
|
return this.pickableField.footerConfig;
|
|
1768
1769
|
}
|
|
1770
|
+
get refreshDisplayValues$() {
|
|
1771
|
+
return this.pickableField.refreshDisplayValues$;
|
|
1772
|
+
}
|
|
1769
1773
|
loadDisplayValuesForValues(values) {
|
|
1770
1774
|
return this.loadDisplayValuesForFieldValues(values.map((value) => ({ value })));
|
|
1771
1775
|
}
|
|
@@ -1804,6 +1808,9 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1804
1808
|
}
|
|
1805
1809
|
ngOnInit() {
|
|
1806
1810
|
this._formControlObs.next(this.formControl);
|
|
1811
|
+
if (this.refreshDisplayValues$ != null) {
|
|
1812
|
+
this._clearDisplayHashMapSub.subscription = this.refreshDisplayValues$.subscribe(() => this._displayHashMap.next(new Map()));
|
|
1813
|
+
}
|
|
1807
1814
|
// Focus after finished loading for the first time.
|
|
1808
1815
|
this.context.loading$
|
|
1809
1816
|
.pipe(delay(10), filter((x) => x), first())
|
|
@@ -1815,6 +1822,7 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1815
1822
|
super.ngOnDestroy();
|
|
1816
1823
|
this._displayHashMap.complete();
|
|
1817
1824
|
this._formControlObs.complete();
|
|
1825
|
+
this._clearDisplayHashMapSub.destroy();
|
|
1818
1826
|
this.filterResultsContext.destroy();
|
|
1819
1827
|
}
|
|
1820
1828
|
_getValueOnFormControl(valueOnFormControl) {
|