Closed alewando closed 9 years ago
Great idea! Now that I think of it, it seemed to be a missing feature. :+1:
Does this allow sorting be conditionally disabled at run time? Think of the case where a user doesn't have permission to resort a set of records.
I added support for using a Proc for the 'sortable' option.
Great stuff.. I integrated it into my branch: active_admin-sortable_tree. I decided to completely disable the Javascript when sorting isn't available.
I ended up going in a different direction, but it is now possible to completely disable sorting. Thanks again for the idea and PR!!
Adds option 'sortable' (default: true) that can be used to disable drag-and-drop sorting. A use case for this is when you want the collapsable tree behavior, but do not want to allow sorting.