Infiniate scrollable tables #770
Replies: 2 comments 2 replies
-
This very much depends on the use-case. I disagree that the pagination component should be deprecated.
Flux only provides a component to display paginated results; it doesn't provide the functionality. That's all Laravel. I think as soon as it touches backend functionality, which infinite scrolling requires, it shouldn't be a Flux component. |
Beta Was this translation helpful? Give feedback.
-
@beams you can have infinite scroll tables in flux already. I use below with Alpine plugin intersect and it works well with pagination: <div x-intersect.margin.50%="$wire.loadMore()">
<flux:icon.loading class="hidden" wire:loading.class.remove="hidden"></flux:icon.loading>
</div> public function loadMore(): void
{
$this->limit += $this->perPage;
} Model::all()->paginate($this->limit); |
Beta Was this translation helpful? Give feedback.
-
To be honest I feel there is absolutely no need for a modern framework to provide table pagination. Pagination is really a very poor UX solution and was only ever created back when ajax requests were not possible.
It would be really nice to have a decent infinitely scrollable table with searching, filtering and sorting. If this was well constructed you could deprecate the paging entirely and focus on one modern component.
Beta Was this translation helpful? Give feedback.
All reactions