@recursyve/nice-ui-kit.v2 13.2.0-beta.102 → 13.2.0-beta.103
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/directives/chip-list/chip-list.directive.mjs +13 -8
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs +13 -8
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +12 -7
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/lib/directives/chip-list/chip-list.directive.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8980,13 +8980,7 @@ class NiceChipListDirective {
|
|
|
8980
8980
|
this.withItemList.items$ = this.values$;
|
|
8981
8981
|
this.withItemList.removeChip.pipe(takeUntil(this.unsubscribeAll$)).subscribe(x => {
|
|
8982
8982
|
this._values.splice(x, 1);
|
|
8983
|
-
|
|
8984
|
-
const searchOptions = this.asyncTypeahead.searchOptions;
|
|
8985
|
-
this.asyncTypeahead.searchOptions = { ...(searchOptions ?? {}), ignore: this._values ?? [] };
|
|
8986
|
-
this.asyncTypeahead.ngOnChanges({
|
|
8987
|
-
searchOptions: new SimpleChange(searchOptions, this.asyncTypeahead.searchOptions, false)
|
|
8988
|
-
});
|
|
8989
|
-
}
|
|
8983
|
+
this.updateTypeaheadSearchOptions();
|
|
8990
8984
|
this.propagateChanges(this._values);
|
|
8991
8985
|
this.values$.next(this._values);
|
|
8992
8986
|
});
|
|
@@ -8994,6 +8988,7 @@ class NiceChipListDirective {
|
|
|
8994
8988
|
}
|
|
8995
8989
|
writeValue(obj) {
|
|
8996
8990
|
this._values = obj ?? [];
|
|
8991
|
+
this.updateTypeaheadSearchOptions();
|
|
8997
8992
|
this.values$.next(this._values);
|
|
8998
8993
|
}
|
|
8999
8994
|
registerOnChange(fn) {
|
|
@@ -9017,6 +9012,16 @@ class NiceChipListDirective {
|
|
|
9017
9012
|
this.propagateChanges(this._values);
|
|
9018
9013
|
this.values$.next(this._values);
|
|
9019
9014
|
}
|
|
9015
|
+
updateTypeaheadSearchOptions() {
|
|
9016
|
+
if (!this.asyncTypeahead) {
|
|
9017
|
+
return;
|
|
9018
|
+
}
|
|
9019
|
+
const searchOptions = this.asyncTypeahead.searchOptions;
|
|
9020
|
+
this.asyncTypeahead.searchOptions = { ...(searchOptions ?? {}), ignore: this._values ?? [] };
|
|
9021
|
+
this.asyncTypeahead.ngOnChanges({
|
|
9022
|
+
searchOptions: new SimpleChange(searchOptions, this.asyncTypeahead.searchOptions, false)
|
|
9023
|
+
});
|
|
9024
|
+
}
|
|
9020
9025
|
}
|
|
9021
9026
|
NiceChipListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceChipListDirective, deps: [{ token: NiceAsyncTypeaheadComponent, optional: true }, { token: i1$2.NgControl, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
9022
9027
|
NiceChipListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: NiceChipListDirective, selector: "input[niceChipList], nice-async-typeahead[niceChipList]", inputs: { withItemList: "withItemList", reloadOnSelected: "reloadOnSelected" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, usesOnChanges: true, ngImport: i0 });
|