Provide an example about how to provide a custom order
See original GitHub issueHi!
I have a small question regarding the function that can be passed to order
option.
Now, as mentioned in the documentation:
Provide the name of one of the built-in sort orders or a comparison function that is passed to (Array.sort
). This function receives two declaration names and is expected to return -1
, 0
or 1
depending on the wanted order.
I think that Is pretty clear, however I have hard time figure out how to to do this mainly because I don’t know Js, and maybe some peoples can be in my situation too.
It wouldn’t be useful to include an example in the readme.md on how to do this?
Thank you very much! 🙏
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Sort data using a custom list - Microsoft Support
In the ribbon, click Data > Sort. In the Sort popup window, in the Sort by drop-down, choose the column on which you...
Read more >How to create a custom sort when a regular sort won't do in ...
On the Home tab, click Sort in the Editing group and click Custom Sort. On the Data tab, click Sort in the Sort...
Read more >Sort a Column with a Custom Order in Power BI - RADACAD
In this post, I am going to show you how to do a custom sort order for a column in Power BI. Sample...
Read more >How to Custom Sort in Excel - Tutorial - YouTube
Doing a custom sort allows you to specify the order in which your list will ... For example, you can create a custom...
Read more >How to Custom Sort in SQL ORDER BY Clause?
Step 1: We are creating a Database. For this use the below command to create a database named GeeksforGeeks. Query: CREATE DATABASE ...
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
Yes, working, and it is pretty clear! I think that this can bee a good example to include in the documentation, maybe adding another property to the array:
👋, I want to provide a custom order for sort my CSS properties, as mentioned in the documentation is possibile with the order: option, but I had hard time figure out how to do this (I’m very begginer in js), for that It will be very useful to provide an example of how to to this (maybe I am not the only who don’t well js, and also It will be probably a small time saver for all).
Thank you very much!