Skip to content

[WC-3462] Fix Gallery widget JS actions (Reset Filters, Clear Selection)#2266

Open
r0b1n wants to merge 1 commit into
mainfrom
fix/WC-3462-gallery-js-actions
Open

[WC-3462] Fix Gallery widget JS actions (Reset Filters, Clear Selection)#2266
r0b1n wants to merge 1 commit into
mainfrom
fix/WC-3462-gallery-js-actions

Conversation

@r0b1n

@r0b1n r0b1n commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Gallery widget doesn't respond to "Reset All Filters" and "Clear Selection" JS actions. Event listeners were never registered despite having all the required infrastructure.

This fix creates useGalleryJSActions() helper and integrates it into the widget, mirroring datagrid's working implementation.

Testing Required

  • "Reset All Filters" JS action clears gallery filters
  • "Clear Selection" JS action clears gallery selection

…d Clear Selection

Gallery widget has all infrastructure for external JS actions support
but never registered event listeners, causing "Reset All Filters" and
"Clear Selection" actions to fire into the void.

This change:
- Creates useGalleryJSActions() helper to register event listeners
- Integrates hook into GalleryWidget component
- Mirrors datagrid's working implementation pattern

Infrastructure already existed:
- @mendix/widget-plugin-external-events dependency
- Config with name and filtersChannelName
- SelectActionsProvider with clearSelection() method
- Filter system with CombinedFilter

The fix is minimal - just wires up the listeners.

Jira: WC-3462
@r0b1n r0b1n force-pushed the fix/WC-3462-gallery-js-actions branch from 7871f22 to ba3b764 Compare June 16, 2026 12:52
@r0b1n r0b1n marked this pull request as ready for review June 16, 2026 13:39
@r0b1n r0b1n requested a review from a team as a code owner June 16, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant