In datatable with rowGroupMode as rowspan, sorting other fields is changing the grouping field
Current behavior
Create datatable with rowGroupMode as rowspan.

Given the field to group as "brand" and the "year" as sortable column. On sorting "year", grouping is done for "year" column

Find the sample code in the link below: https://codesandbox.io/s/primereact-test-igm27
Expected behavior On sorting other fields in datatable with rowGroupMode as rowspan, the grouping field should not get changed.
I am also having the same issue.
Would also be interested in an answer.
Hi,
I am not sure about this change. When you change the year value of one of the Audi items (Exp: 2014 instead of 2012 ), how should it be grouped? I think it's a bit confusing.
Hi @mertsincan , The expected behaviour is if "brand" is grouped then while sorting "year" the grouping should be done in the same "brand" field instead of "year". Please find the images for the expected behaviour:
This is the initial table with "brand" as rowgroup.
This is the expected output when "year" field is sorted
Just perusing the backlog. This ask is definitely wrong and goes against the general consensus of what GroupBy and SortBy in database should mean.
What @sharmillamuthu is asking for is Sorting by multiple keys.
See this CodeSandbox with the configurations that you want. This can be done by manipulating the multiSortMeta object as needed to prioritize the order as you see fit.
I'd recommend that this issue be closed out.
Thanks @bweis marked as Workaround provided!