Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table rendering and loading all components even with pagination #430

Open
yuriPeixoto opened this issue Jan 15, 2025 · 1 comment
Open

Comments

@yuriPeixoto
Copy link

Context: I have some tables with a lot of data. Actually I saw that in a table with 6100 rows, but I have some with much more. Using eager loading (laravel project) the queries return in ~1s. But the view is taking 1 minute or more to load. Inspecting, using debugbar, I saw that the view is rendering all the table components in the view (icons, buttons, etc), not only the 10 that I put to show in the paginated view. So, probably this is the origin of the delay. This is the expected behavior of the component? And if no, how can I fix this?

@mkocansey
Copy link
Owner

The table component does client-side pagination. So it takes all the data you pass to it and then paginates it to prevent the user from going back to the server for more data. This may not work optimally for large datasets. The workaround for this will be to use the pagination that comes inbuilt with Laravel and then only use all other features of the table component other than pagination. Don't know if this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants