Lazy load tab
I have a view page with multiple tabs for the infolist. One of the tabs does not need to be accessed often, and accessing a rate limited API.
Therefore I would only like the contents of the tab to load when the user actually goes to that tab.
How can I approach this?
2 Replies
I managed to solve it like this:
companyweb-loader.blade.php
CompanywebOverview.php (The actual class I want lazy loaded)
I will now create an infolist in this custom livewire component.
Although this is a 'solution', I don't think it's optimal.
Instead having a ->lazy() on tabs would be pretty cool
I was wrong, it is not working
Your solution is effective, but as you mentioned, it could be streamlined further. Adding a ->lazy() method to your tab system would improve code clarity and better convey intent.