A small standalone Angular component shows a list of quick actions for the entered query and lets the user choose one option with the keyboard or mouse. After a recent PR, the panel started behaving unstably during rapid typing and reopening.
query field updates suggestions through the ShortcutApi service.trim() must clear the list, message, and selection state without calling the API.ChangeDetectionStrategy.OnPush.Escape hotkey must close the panel only while the component exists.Enter key selects the current active item, if there is one.ca, then call.Escape.For local verification, it is convenient to assume that:
ca responds slower than call;closed is the panel close output event.keydown handlers left.Enter and closing with Escape must work predictably for one active instance.20.0.0, standalone components5.8.x7.8.xChangeDetectionStrategy.OnPushzone.js, without zoneless modeReactiveFormsModule, FormControl<string> with nonNullablesearchShortcuts(query: string): Observable<string[]>*ngIfUse line comments to explain the problem, its impact, the fix and how to test it.