@rt-tools/ui-kit 0.0.15 → 0.0.16
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.
|
@@ -2484,9 +2484,6 @@ class RtuiMultiSelectorPopupComponent {
|
|
|
2484
2484
|
ngOnInit() {
|
|
2485
2485
|
/** Clear previous temp selection */
|
|
2486
2486
|
this.temporarySelectAction.emit([]);
|
|
2487
|
-
if (this.searchTerm()) {
|
|
2488
|
-
this.onClearSearch();
|
|
2489
|
-
}
|
|
2490
2487
|
/** Filter list of entities by search */
|
|
2491
2488
|
this.searchControl.valueChanges
|
|
2492
2489
|
.pipe(debounceTime(this.isLocalSearch() ? 0 : 500), takeUntilDestroyed(this.#destroyRef))
|
|
@@ -2535,6 +2532,19 @@ class RtuiMultiSelectorPopupComponent {
|
|
|
2535
2532
|
if (this.searchInputRef) {
|
|
2536
2533
|
this.searchInputRef()?.nativeElement.focus();
|
|
2537
2534
|
}
|
|
2535
|
+
/**
|
|
2536
|
+
* Reset search term left over from a previous open. Deferred from `ngOnInit` to
|
|
2537
|
+
* `ngAfterViewInit` because emitting `searchAction` synchronously in `ngOnInit`
|
|
2538
|
+
* triggers a parent state update during the same change-detection tick in which
|
|
2539
|
+
* the host `cdkConnectedOverlay` is attaching. The cascade detaches/reattaches
|
|
2540
|
+
* the overlay's origin reference before its position strategy has computed the
|
|
2541
|
+
* connected coordinates, leaving the popup pinned at (0, 0). By the time
|
|
2542
|
+
* `ngAfterViewInit` runs the overlay is positioned, so a downstream re-fetch is
|
|
2543
|
+
* safe.
|
|
2544
|
+
*/
|
|
2545
|
+
if (this.searchTerm()) {
|
|
2546
|
+
this.onClearSearch();
|
|
2547
|
+
}
|
|
2538
2548
|
}
|
|
2539
2549
|
/** Change Multi election mode */
|
|
2540
2550
|
toggleMultiSelection() {
|