F
Filament5mo ago
nowak

Force reorderable() to be active by default

Is it possible to force reorderable() to be active by default? As in, the user does not have to click the reorderable button to be able to drag and drop rows?
Solution:
Yes, isTableReordering is probably the right one. Just set it to true? Also: I said the ListPage, not the resource.
Jump to solution
6 Replies
Dennis Koch
Dennis Koch5mo ago
There are various reorder methods on the list page. Don't know the exact naming, but one is for deciding whether reorder is active.
nowak
nowak5mo ago
Thanks for the reply! Where can I read about methods for the list page? I can't find anything on this in the Listing Records Documentation for v3, but I found this in the ListRecords::Class:
#[Url]
public bool $isTableReordering = false;
#[Url]
public bool $isTableReordering = false;
Is this the one you meant? And how would I set this to true in my ListResource Class?
Dennis Koch
Dennis Koch5mo ago
They are not documented. You need to source dive the code.
Solution
Dennis Koch
Dennis Koch5mo ago
Yes, isTableReordering is probably the right one. Just set it to true? Also: I said the ListPage, not the resource.
nowak
nowak5mo ago
Awesome, it worked!! by ListResource I meant ListGroupOrders, in my case my Resource is GroupOrderResource, so I guess this is still the ListPage, Does a ListResource entity exist as well? Thank you!
Dennis Koch
Dennis Koch5mo ago
Alright. Then it's fine. Just notice the difference between pages and resources