ponzu-cms / ponzu

Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
https://docs.ponzu-cms.org
BSD 3-Clause "New" or "Revised" License
5.67k stars 387 forks source link

Sorting results in Select and SelectRepeater #322

Closed junnotantra closed 4 years ago

junnotantra commented 4 years ago

This PR is based on feature request on #280 Sorting results in SelectRepeater

changes:

olliephillips commented 4 years ago

Hey @junnotantra, thanks for picking this up. I'll have some time tomorrow to look at this PR. Thanks again

olliephillips commented 4 years ago

@junnotantra Code looks good and I've tested to work as expected. I tested core select functionality, and selectrepeater in the reference addon. I can't think of another way to approach sorting the map output while maintaining access to keys and values.

On the issue of whether to bring the reference addon into the core, you stated reasons for not doing that. I don't know if that debate needs to progress @nilslice but I'd be happy to bring this into ponzu-dev based on testing.

Of note, the source for the reference addon exists in another repo, (https://github.com/bosssauce/reference) so that is out of sync and will need to be updated.