show/hide reorder based on conditions?
Reordering a table seemed amazing until I realized I'm working with a table with ~5000 rows ...it hangs up and goes kaboom unless a filter that limits the data is applied.
I'd love to be able to enforce that practice with end users.
I was thinking that maybe conditionally showing the reorder icon only when a filter is present would be a potential solution. But
reorderable()
only accepts string input. π¦
Any advice for working with sortable rows with large data sets?7 Replies
Reordering disable pagination by default.
you can change this behaviour by using
combine that with
forces the user to reorder on max 50 record per page
that solved it for me
first off, thank you. the reordering is strange but I think that's a bit innate. when
isTablePaginationEnabledWhileReordering90 == true
it leaves many duplicate order numbers (as expected) I don't think that's optimal for my use case.
I really don't mind the default reordering IF I could somehow enforce filtering. I'm hoping there is a way to only allow reordering if a filter is applied. The reason is, once a filter is applied the data count gets cut down to < 2% of the total and reordering works quite nicely.i really dont think you should use drag and drop reordering for 5000 rows
thats not a good UX for your users regardless of the performance
maybe just add action buttons to each row that can move a row up or down the list, that way you preserve pagination too
+1 for Dan's comment, you are asking for a hell of a lot on the browser too. Lesser computers will struggle too.
I agree. That's why I would like to enforce a filter before enabling drop reordering? Most of filament has closures for allowing conditionals. A simple example is ->hidden(...) etc... Is there a way to show/hide drag-reordering based on a filter condition?
oh nice...I'll give this a try later. Thank you. not sure why but phpstorm's auto-fill-a-function has not been finding methods lately.