[Bug] PowerSearch: selecting enum_list value in edit popover dismisses dropdown without adding token
Description
In PowerSearch, when editing or adding an enum_list filter (such as Status: is any of), clicking an option in the nested values typeahead dropdown fails to add the token chip and dismisses the edit popover.
Cause
The option elements in BaseTypeahead (<div role="option">) lack onMouseDown={(e) => e.preventDefault()}. On mouse click, the combobox <input> blurs before the click handler can commit the item, and the outer PowerSearch popover light-dismisses due to focus escaping the parent layer.
Reproduction
Steps to Reproduce
- Open Storybook link and navigate to
PowerSearch->Issue Tracker (Grouped Fields). - Click the search input and select Status.
- The edit popover opens with field
Status, operatoris any of, and theSelect values...input. - Focus
Select values...to see the dropdown list (Open,In Progress,In Review, etc.). - Click on any option (e.g. Open).
Expected Behavior
Clicking an option adds it as a token in the Values editor and keeps the edit popover open so the user can choose more values or click Apply.
Actual Behavior
Clicking the option dismisses the popover immediately without committing the token, and the filter is lost.
Astryx Version
0.7.1 (main)
Environment
Chrome 125+, Windows 11
https://github.com/user-attachments/assets/2d96cff5-fd2f-4f76-8ad1-1db3ce16c880
I'd like to work on this — please assign it to me. I'll open a PR shortly.
you can just open a pr @akhil9tiet idts i can assign anyone since im not a maintainer
Thanks for the clear report and the repro video! We're picking this up now and will link the fix PR here.