Select: order of keys does not follow insertion orders when mixing string and numbers
See original GitHub issueFor now, options with custom labels in a select input is achieved by passing an Object
: Story Book Demo. However, the order of the rendered options is determined by Object.keys()
or Object.values()
, and does not (always) follow the insertion order, which makes this feature kind of a no-go. AFAIK, Map
seems to be a more feasible option?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Keep the order of the JSON keys during JSON conversion to ...
println("Ordered JSON Fianl CSV :: "+CDL.toString(jsonArray));. So there is no need to change the JSONObject.java class . Hope it helps somebody .
Read more >Sorting a Python Dictionary: Values, Keys, and More
An essential point to understand when sorting dictionaries is that even though they conserve insertion order, they're not considered a sequence.
Read more >3. Strings, lists, and tuples — Beginning Python Programming ...
Strings, lists, and tuples are all sequence types, so called because they behave like a sequence - an ordered collection of objects.
Read more >Binary Insertion Sort - GeeksforGeeks
Binary insertion sort is a sorting algorithm which is similar to the insertion sort, but instead of using linear search to find the...
Read more >Using Group By and Order By in the Same Query - Navicat
Notice that, once you include the Order By clause, the default group ordering is lost. If you'd like to keep it, you can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sure I wouldn’t mind the Map. Feel free to propose a PR. In the meantime, although this is not a very elegant solution, you can always add a space after the number key so that it considered a string. Therefore the order should be respected.
OK, I’ll see what I can do.