Skip to content

fix: correct filter behavior on preview pages#155

Merged
tristan-mouchet merged 1 commit intodevelopfrom
fix/filtering-issues
Apr 10, 2026
Merged

fix: correct filter behavior on preview pages#155
tristan-mouchet merged 1 commit intodevelopfrom
fix/filtering-issues

Conversation

@tristan-mouchet
Copy link
Copy Markdown
Collaborator

@tristan-mouchet tristan-mouchet commented Apr 10, 2026

Summary

Fix collection filters not working correctly on preview/generated pages due to the filter API always querying published data and incorrect operator handling for multi-select inputs.

Changes

  • Pass isPublished flag from _filterConfig through FilterableCollection to the filter API so preview pages query draft data instead of published
  • Preserve the original filter operator for checkbox groups instead of always forcing is_one_of
  • Register radio button value changes in the filter store alongside checkboxes

Test plan

  • Open a page with collection filters in preview — verify filters return results
  • Test checkbox filter with contains_all_of operator — confirm it uses the correct operator
  • Test radio button filter — confirm selecting an option filters the collection
  • Verify published pages still work with filters (client-side filtering)

- Pass isPublished flag through FilterableCollection to filter API so preview pages query draft data instead of published
- Preserve original filter operator for checkboxes instead of always forcing is_one_of
- Register radio button values in filter store on change
@tristan-mouchet tristan-mouchet added the Bug Something isn't working label Apr 10, 2026
@tristan-mouchet tristan-mouchet self-assigned this Apr 10, 2026
@tristan-mouchet tristan-mouchet linked an issue Apr 10, 2026 that may be closed by this pull request
@tristan-mouchet tristan-mouchet merged commit bd012b6 into develop Apr 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter form issues

1 participant