Add API for sorting sections
FlyingDiver opened this issue ยท 5 comments
In addition to the API for filtering, it would be nice to have an API to order the sections. This would require some meta-data for each section that identifies what the filters were that produced that section. And also access to the layout parameters.
I won't be exposing any layout parameters via the API -- my goal is not to make a generic bag that anyone can do anything to, and I am opinionated in what I am building, i.e. this isn't a "Cidan, please build me a custom bag" project.
I will, however, expose the injecting of sorting algorithms for both sections and items at some point.
Actually, those are already available -- everything is modular and it's as simple as reading the database at the time of sort, no special handling required.
I didn't mean to imply that the API would be to change the layout. Only that the final section sort might be influenced by the actual layout size. I'll hold any other comments until we see what you do allow. ;)
Oh I see -- passing in the column and item per row count to the sorter is reasonable.