What I want to do is to sort the data already grouped in alphabetical order or custom order. I used the sortField
attribute which specify the groupheader order but
I have the same issues. I have added customized sort to solve this issues
To add a customized sort
In the typescript create a customSort
sortByColor(e) {
this.cars.sort(function (a, b) {
let aGroup = a.name.toLowerCase();
let bGroup = b.name.toLowerCase();
if (aGroup > bGroup) return 1;
if (aGroup < bGroup) return -1;
let aSort = a.color.toLowerCase();
let bSort = b.color.toLowerCase();
if (aSort > bSort) return 1;
if (aSort < bSort) return -1;
return 0
});
}