Support Forum
And it doesn't seem to work when sorting numbers either, even if I use "type: 'number'" as in your example on https://www.bryntum.com/docs/grid/#Grid/feature/Sort
I've tried your data on the sample https://bryntum.com/examples/grid/sorting/
the asc sort order is: A..Za..zÅÄåäÖö. Numbers get sorted as usual numbers.
Values get compared using "<" and ">" operators.
You can also provide your custom sorting function to colums, for example:
Please check localeCompare docs for details
https://developer.mozilla.org/en-US/doc ... aleCompare
the asc sort order is: A..Za..zÅÄåäÖö. Numbers get sorted as usual numbers.
Values get compared using "<" and ">" operators.
You can also provide your custom sorting function to colums, for example:
{
text : 'City',
field : 'city',
flex : 1,
sortable : (a, b) => a['city'].localeCompare(b['city'], 'sv', {caseFirst : 'upper'})
},
https://developer.mozilla.org/en-US/doc ... aleCompare
Pavlo Miklashevych
Sr. Frontend Developer
What do you mean? Is it sorted like: A, b, C, d, Z, å, Ä, ö when you use my array? Or is it A, C, Z, Ä, b, d, å, ö? (I want the first version)
When I sort on type: number it will sort 1, 10, 11, 12, 2, 3, 4, 5... not as I would assume: 1, 2, 3, 4, 5, 10, 11, 12. How is it displayed on your end and what is the intended behaviour?
When I sort on type: number it will sort 1, 10, 11, 12, 2, 3, 4, 5... not as I would assume: 1, 2, 3, 4, 5, 10, 11, 12. How is it displayed on your end and what is the intended behaviour?
Sorting on Number seems fine to me, try sorting Age column here? https://bryntum.com/examples/grid/sorting/