Skip to content

Comments

Add Apply button to mobile filter drawer#834

Merged
dennyabrain merged 4 commits intotattle-made:mainfrom
Mahimahto:add-apply-button-multi-filters
Oct 17, 2025
Merged

Add Apply button to mobile filter drawer#834
dennyabrain merged 4 commits intotattle-made:mainfrom
Mahimahto:add-apply-button-multi-filters

Conversation

@Mahimahto
Copy link
Collaborator

What this PR does

  • Added an "Apply Filters" button in the mobile filter drawer.
  • Users can now explicitly apply their selected filters instead of filters being applied automatically.
  • Integrated the button with the phx-submit event apply-mobile-filters.

How it works

  • The form captures filter inputs (date range, severity, casual, appropriated, source, categories, sort) in a filters map.
  • On clicking "Apply Filters", the handle_event/3 function is triggered, converting filter params into a query string and updating the page via push_patch.

Current Issue / Pending

  • Even after adding the "Apply Filters" button, the filters are still applied automatically without clicking the button.
  • Need guidance on how to prevent automatic filter application and ensure filters are applied only on clicking the button.

Notes / Questions

  • Requesting input on how to modify the current LiveView so that filters are applied only on submit.

@Mahimahto Mahimahto linked an issue Oct 7, 2025 that may be closed by this pull request
@dennyabrain
Copy link
Contributor

Very good work on this @Mahimahto!
Merging now.

@dennyabrain dennyabrain merged commit 51b8bb9 into tattle-made:main Oct 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Apply" button to allow applying multiple filters at once

2 participants