metabase icon indicating copy to clipboard operation
metabase copied to clipboard

UXW-1852 Reset filter to default for specific click behavior

Open deniskaber opened this issue 4 months ago • 1 comments

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.

  1. Go to a dashboard, add a date filter with a default filter, and set the filter to always require a value
  2. Set up click behavior for a question on the dashboard and set it to "update a dashboard filter" for date column
  3. Toggle the question's click behavior to apply and remove a filter
  4. 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

deniskaber avatar Dec 18 '25 21:12 deniskaber

I'd add e2e test for this specific case

uladzimirdev avatar Dec 23 '25 19:12 uladzimirdev

e2e tests failed on 71493b3ab12c2eddadf55a0247e2b181bf646a9c-1

e2e test run

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

github-actions[bot] avatar Dec 23 '25 22:12 github-actions[bot]