awcodes / filament-sticky-header

A Filament Panels plugin to make headers sticky when scrolling.
MIT License
54 stars 8 forks source link

Support closures in `floating()` and `colored()` methods #25

Closed rhiannonjourney closed 8 months ago

rhiannonjourney commented 8 months ago

This pull request adds support for passing a closure to the floating() and colored() methods.

I think all of the changes are pretty straightforward, but I did have to move the FilamentAsset::registerScriptData() call into the boot() method instead of the register() method because certain things, like accessing auth()->user(), don't work if the closures are evaluated when the plugin is registered.

awcodes commented 8 months ago

Thanks