tickera-angular-components 0.0.1-dev.196 → 0.0.1-dev.197
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.
|
@@ -7735,15 +7735,20 @@ class AsyncSelectComponent {
|
|
|
7735
7735
|
if (!this.config)
|
|
7736
7736
|
return of([]);
|
|
7737
7737
|
const mergedParams = { ...params };
|
|
7738
|
-
if (this.
|
|
7738
|
+
if (this.hasParentId() && mergedParams.parentId == null) {
|
|
7739
7739
|
mergedParams.parentId = this.parentId;
|
|
7740
7740
|
}
|
|
7741
7741
|
return this.config.load(mergedParams).pipe(map((res) => this.config.map(res)), catchError(() => of([])));
|
|
7742
7742
|
}
|
|
7743
|
+
hasParentId() {
|
|
7744
|
+
if (this.parentId == null)
|
|
7745
|
+
return false;
|
|
7746
|
+
return Array.isArray(this.parentId) ? this.parentId.length > 0 : true;
|
|
7747
|
+
}
|
|
7743
7748
|
handleParentIdChange() {
|
|
7744
7749
|
this.value = this.multiple ? [] : null;
|
|
7745
7750
|
this.onChange(this.value);
|
|
7746
|
-
if (this.
|
|
7751
|
+
if (this.hasParentId() && this.config) {
|
|
7747
7752
|
this.loadAndMap({ parentId: this.parentId });
|
|
7748
7753
|
}
|
|
7749
7754
|
else if (this.config) {
|