Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filamentβ€’3y agoβ€’
1 reply
Mack H

JS Event and Field Listener

I'm working on bringing lazy loading to Filament Select Tree. There is a callback that gives us the expanded groupId, but I'm unsure how to report that back to SelectTree.php which is an Alpine Component.

https://github.com/CodeWithDennis/filament-select-tree

The changes I have made in my fork are bumping TreeSelectJS to 0.93 and the following in index.js

                openCloseGroupCallback: (groupId, isClosed) => {
                    if (!isClosed) {
                        console.log(groupId);
                    }
                },
                openCloseGroupCallback: (groupId, isClosed) => {
                    if (!isClosed) {
                        console.log(groupId);
                    }
                },


Not quite sure how to dispatch an event here and then catch it in SelecTree.php or the view. I just know that needs to be it's next stop πŸ˜‚
GitHub
GitHub - CodeWithDennis/filament-select-tree: The multi-level selec...
The multi-level select field lets you pick one or multiple options from a list that is neatly organized into different levels. - GitHub - CodeWithDennis/filament-select-tree: The multi-level select...
GitHub - CodeWithDennis/filament-select-tree: The multi-level selec...
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel β€’ Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Filament event listener?
FilamentFFilament / β“β”Šhelp
2y ago
Repeater Event listener not working
FilamentFFilament / β“β”Šhelp
2y ago
Using alpine to update a Form Field using an x-on event listener.
FilamentFFilament / β“β”Šhelp
17mo ago
How and where to create listener for notification dispatch button event?
FilamentFFilament / β“β”Šhelp
2y ago