astryx icon indicating copy to clipboard operation
astryx copied to clipboard

[Bug] PowerSearch: selecting enum_list value in edit popover dismisses dropdown without adding token

Open Geervan opened this issue 1 month ago • 3 comments

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

  1. Open Storybook link and navigate to PowerSearch -> Issue Tracker (Grouped Fields).
  2. Click the search input and select Status.
  3. The edit popover opens with field Status, operator is any of, and the Select values... input.
  4. Focus Select values... to see the dropdown list (Open, In Progress, In Review, etc.).
  5. 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

Geervan avatar Oct 14 '26 05:10 Geervan

I'd like to work on this — please assign it to me. I'll open a PR shortly.

akhil9tiet avatar Oct 14 '26 18:10 akhil9tiet

you can just open a pr @akhil9tiet idts i can assign anyone since im not a maintainer

Geervan avatar Oct 14 '26 18:10 Geervan

Thanks for the clear report and the repro video! We're picking this up now and will link the fix PR here.

cixzhang avatar Oct 16 '26 23:10 cixzhang