angular-ui/ui-grid

Custom Sorting not being used immediately.

Open

#4491 aperta il 7 ott 2015

Vedi su GitHub
 (0 commenti) (1 reazione) (0 assegnatari)JavaScript (2496 fork)batch import
help wantedneeds: analysis

Metriche repository

Star
 (5395 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

This is an edge case to be sure, but..

If you have data that is taking a long time to load, and you click sorting on your grid with a defined sortingAlgorithm, when the data does come back, it will sort the data, but not use the sortingAlgorithm defined to do so. You can of course, click a couple more times to get it to sort after data has loaded and it will use the sorting Algorithm, but not before.

Similarly related, if you have a default sort, with a sorting algorithm, it does not appear to use the sorting algorithim as the initial sort IF the data takes a while to load.

I imagine what is happening is that data that is added into the grid does not use the sorting algorithm even if sorting is enabled while the data is being added, but data that is sorted after clicking the sort bar does. Thus you see this effect. I may be wrong of course, that is just a guess based on what I am seeing.

Guida contributor