fix(core): improve table header sorting logic in processTable function (#14797)
Bug Resolved #14795 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Made row and column sorting deterministic when items share the same order value, reducing unexpected cell shifts. * Adjusted comparator behavior to preserve tied-order grouping, which may change displayed column/row sequence in edge cases. * Improved consistency of table rendering and cell placement across refreshes and edits. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -4,3 +4,8 @@ export const cleanSelection = () => {
|
||||
selection.removeAllRanges();
|
||||
}
|
||||
};
|
||||
|
||||
export const compareByOrder = <T extends { order: string }>(
|
||||
a: T,
|
||||
b: T
|
||||
): number => (a.order === b.order ? 0 : a.order > b.order ? 1 : -1);
|
||||
|
||||
Reference in New Issue
Block a user