-
-
Notifications
You must be signed in to change notification settings - Fork 665
Open
Description
It is not an uncommon need to be able to reorder rows in a table layout. Since SortableJS is already a project dependency, it shouldn't be too hard to implement
I have put together a proof of concept that enables the feature with the minimum amount of changes in the platform.
It introduces a new action that can be added to a dedicated column. This is an example applied to the RoleListLayout
:
public function columns(): array
{
return [
TD::make()
->cantHide()
->render(function (Role $role) {
return ReorderHandle::make()
->method('reorder')
->key($role->getKey());
}),
...
];
}
Not sure this is the best way to go about it, though. Thoughts?
p010x
Metadata
Metadata
Assignees
Labels
No labels