orchidsoftware / orchidsoftware/platform
Drag to reorder table rows
Open
@tabuna is already working on this.
Since Sep 16, 2022.
- Dominant language
- PHP
- Stars
- 4.8k
- Forks
- 662
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 7
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.