mirror of
https://github.com/gosticks/react-table.git
synced 2026-01-30 21:37:33 +00:00
improve(sort): don't sort subrows less than 2 characters (#1449)
it improves performance because cuts a lot of sorting manipulations
This commit is contained in:
parent
d4303a2468
commit
c77ffacdc9
@ -252,7 +252,7 @@ function useMain(instance) {
|
||||
|
||||
// If there are sub-rows, sort them
|
||||
sortedData.forEach(row => {
|
||||
if (!row.subRows) {
|
||||
if (!row.subRows || row.subRows.length <= 1) {
|
||||
return
|
||||
}
|
||||
row.subRows = sortData(row.subRows)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user