[Bug]: Auto injection is triggered on non-Livewire pages
dmyers opened this issue · 3 comments
What happened?
I noticed that the core and 3rd party assets are loaded on every page, regardless if there is a table on the page or not.
Is it possible that I could either manually load these in a parent view I have or, make it so that they only are loaded on pages that have the Livewire table loaded somehow?
Or maybe with a directive? Like @livewireTables
.
Or could this be in the Livewire views with a @once
or something?
How to reproduce the bug
No response
Package Version
3.1.4
PHP Version
8.2.x
Laravel Version
10
Alpine Version
3
Theme
Tailwind 3.x
Notes
No response
Error Message
No response
I just discovered that there are directives already. Very awesome. They just don't seem to be listed anywhere in the docs that I could find here: https://rappasoft.com/docs/laravel-livewire-tables/v3/start/including-assets
Here they are if anyone else needs them. @lrljoe I will close this, but let me know if you want help with the docs.
I still think something is wrong with the auto injection though, affecting any route I have that has <html></html>
in it and seems to behave different than Livewire as it doesn't have the same problem in my tests.
@rappasoftTableStyles
@rappasoftTableThirdPartyStyles
@rappasoftTableScripts
@rappasoftTableThirdPartyScripts
Will make sure to update the docs for next release!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.