charliefrantowski opened a new issue, #45934:
URL: https://github.com/apache/superset/issues/45934

   ### Bug description
   
   A native filter whose stored config has `requiredFirst` set to a non-boolean 
truthy value (for example `{}`) applies the user's first selection immediately, 
before they click Apply.
   
   `FilterBar/index.tsx` checks `isFirstTimeInitialization && 
filter.requiredFirst`, so any truthy value counts. `DashboardBuilder/state.ts` 
and `FilterValue.tsx` already check `requiredFirst === true`, so the parts 
disagree.
   
   **How to reproduce**
   
   1. Create a dashboard with one native filter (e.g. a Time range filter) and 
one chart. Leave "Select first filter value by default" off.
   2. In the dashboard's JSON metadata, set that filter's `"requiredFirst": {}` 
under `native_filter_configuration` and save.
   3. Reload the dashboard and pick a value in the filter.
   
   **Expected:** the value waits until Apply is clicked, as for any filter that 
is not required first.
   
   **Actual:** the first pick is applied at once and the charts refresh without 
clicking Apply.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev (also seen on 6.1.0)
   
   ### Python version
   
   3.11
   
   ### Node version
   
   Not applicable (front-end logic)
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   Related but different: #38479, #40978, #37640.
   
   A fix PR follows. AI disclosure: this report was drafted with Claude Code 
and checked by a person.
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.
   


-- 
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]

Reply via email to