angauber / nova-select2-filter

A laravel nova filter that implements jquery select2
MIT License
4 stars 0 forks source link

Filter reset not applied to select2 #3

Open gross-nvs opened 4 years ago

gross-nvs commented 4 years ago

Laravel 5.8 Nova: 2.6.1

When setting a filter the list is updated properly, but if nova's reset filter button is used, select2 isn't updated, filter options are still visible but not applied, which result in an inconstancy making select2 having an unwanted behaviour (reapplying unselected filters, etc.)

angauber commented 4 years ago

Hello

The reset filter button is in fact not working with this package because it's not compatible with select2. Looking at the source code there is an event that is triggered on click of the Reset filters nova button but it does not look to be triggered on a global event bus making it unavailable to listen on a custom nova component.

If you have any idea on how to fix this I will be happy to hear about it.