Doesnt work for Sitetree descendants because of versioned dataobjects managed by ModelAdmin.
selay opened this issue · 8 comments
Say if Product is a decedent of Page. When you sort them, it updates Product table but not Product_Live.
The version here works as it also updates Live version: https://raw.githubusercontent.com/dnadesign/SortableGridField/a4b51c42b9ecc254212d84324d581e57fb7471ca/code/forms/GridFieldSortableRows.php
But seems the parts which update Live table have been removed in the latest release.
I think it would be good idea to reinstate them because sometimes you need an alternative sort for pages as well, especially when you extend it for Products, Categories etc.
Ya I believe DNA merged this pull request #46, at the time I didn't want to loose support for 3.0 so I never merged it. When a few adjustments were made to 3.1 to better allow compatibility, the code for sortable gridfield had changed too much to merge it. I'll see what I can do about re-creating it, I want to revisit the code in it anyways since there isn't always a _Live table in all implementations using versioned. Likely though it will be the weekend before I can really sit and dig into it.
actually I have merged for my project and it contains all recent 3.1 ones and _Live updating parts. it works fine now. Maybe I can push here if it can make it easier for you?
For sure, one step closer to a solid solution.
Pull request has been merged to the experimental branch, let me know how that works for you.
Cool.
@UndefinedOffset - Is there any plan for that change to merge into master? I'm needing the versioned support but the experimental branch is locked to an older version of Silverstripe so I can't update to the latest and greatest with composer.