gabotorresruiz opened a new pull request, #35801: URL: https://github.com/apache/superset/pull/35801
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> Fixes a bug where clicking on the column or operator dropdown in the adhoc filter editor would cause it to open and immediately close, making it impossible to change the selected value. **Root Cause:** The bug was caused by a ref callback that ran on every render: ```typescript ref={ref => { if (ref && shouldFocusComparator) { ref.focus(); // Runs on EVERY render, stealing focus! } }} ``` When `shouldFocusComparator` was true (both column and operator selected), the callback would continuously call `focus()` on every render, stealing focus from any opened dropdowns and causing them to close immediately. ### BEFORE/AFTER ANIMATED GIF <!--- Skip this if not applicable --> #### Before  #### After  ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> 1. Navigate to Charts → Open any chart in Explore view 2. In the Filters section, click + Add to add a new adhoc filter 3. Select any column from the dropdown 4. Select any operator from the dropdown (e.g., "Equal to (=)") 5. Test the fix: Click on the operator dropdown again. The Dropdown should remain open and allow you to select a different operator ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
