metabase
metabase copied to clipboard
UXW-1852 Reset filter to default for specific click behavior
Closes https://github.com/metabase/metabase/issues/64368 / UXW-1852
Description
This adds logic to reset dashboard filter to default value if it has default value and configured as required after resetting filter using crossfilter click behavior (Update a dashboard filter)
How to verify
Describe the steps to verify that the changes are working as expected.
- Go to a dashboard, add a date filter with a default filter, and set the filter to always require a value
- Set up click behavior for a question on the dashboard and set it to "update a dashboard filter" for date column
- Toggle the question's click behavior to apply and remove a filter
- Notice that the filter widget doesn't reset to the assigned default. It lets you remove a filter that should always require a value
Demo
https://github.com/user-attachments/assets/3401a5f1-a57b-482a-9fcd-c790306bca1b
Checklist
- [x] Tests have been added/updated to cover changes in this PR
I'd add e2e test for this specific case
e2e tests failed on 71493b3ab12c2eddadf55a0247e2b181bf646a9c-1
| File | Test Name |
|---|---|
transforms.cy.spec.ts |
scenarios > admin > transforms > creation > should be possible to create and run a Python transform |
embed-options.cy.spec.ts |
scenarios > embedding > sdk iframe embed options passthrough > shows a static dashboard using drills=false, withTitle=false, withDownloads=true |