I am using a dojo datagrid with col1 as the column with primary sorting and col2 as the secondary sorting column. After the grid loads if I again sort by col1 by clicking on the header, I can see the order of the rows getting changed randomly where the col1 has the similar values in Google Chrome . In Firefox everything seems to be working fine as they have stable sort implementation which maintains the original order of the input in case of similar key values. Is there a way I can implement some custom comparator for Array.sort() or something to avoid this problem in google chrome. Thanks in advance!
It's already implemented. Give a chance to lodash function _.sortBy. It doing stable sort.
Here is docs: https://lodash.com/docs/4.17.4#sortBy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With