Fix for sorting, didn't account for some primitive types.
This commit is contained in:
parent
2a24a3dda6
commit
2d6a8d9ff5
|
@ -143,12 +143,16 @@ export function basicProcessing({
|
|||
return relatedRow
|
||||
})
|
||||
.sort((a, b) => {
|
||||
if (!a?.[sortField]) {
|
||||
const aField = a?.[sortField],
|
||||
bField = b?.[sortField]
|
||||
if (!aField) {
|
||||
return 1
|
||||
} else if (!b?.[sortField]) {
|
||||
} else if (!bField) {
|
||||
return -1
|
||||
}
|
||||
return a[sortField].localeCompare(b[sortField])
|
||||
return aField.localeCompare
|
||||
? aField.localeCompare(bField)
|
||||
: aField - bField
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue