Allow custom order for item groups
The items groups are ordered alphabetically using the group label by default, with no way of customizing their order on the selector. This is because they are stored as a dictionary, if they were a list, insertion order could be preserved.
Hi @RisottoNacho 👋 ,
Thanks for opening an issue.
This is because they are stored as a dictionary, if they were a list, insertion order could be preserved.
Yep, you're 100% right!
I think at the very least it should preserve insertion order, that way you can control it on the calling side.
I'll have a look this weekend for you.
Nice to hear you agree 😄
Thanks for the feedback
Many appologies I couldn't get to it on the weekend. It's on the radar I assure you 😄
Hopping this week I have success.
Buenas.
Any news on this?
Hi @RisottoNacho ! So sorry my friend, I totally neglected this. Yes, i'm going to put in a couple hours this weekend to see if my idea works out!
I had this exact issue pop up for me last week so I'm motivated to sort it out.
Released in 12.2.3
Just take note that this bug still exists https://github.com/Confidenceman02/elm-select/issues/210 that needs to be addressed when using a mixture of grouped and un-grouped menu items.
Other than that the grouped order will respect insertion order.
Thanks again for opening the issue, I'll keep it open in case you want to confirm it works for you or any questions you might have.
👍
Seems to be working just fine, thanks for the feedback 💯