Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/brave-results-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@platforma-sdk/model": patch
---

Reverse the merge order so user sorting comes after ops.sorting, making user selections win
2 changes: 1 addition & 1 deletion sdk/model/src/components/PlDataTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ export function createPlDataTableV2<A, U>(
return valid;
});
const sorting: PTableSorting[] = uniqueBy(
[...tableStateNormalized.pTableParams.sorting, ...(ops?.sorting ?? [])],
[...(ops?.sorting ?? []), ...tableStateNormalized.pTableParams.sorting],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should fine correct solution for all cases

(s) => canonicalizeJson<PTableColumnId>(s.column),
).filter((s) => {
const valid = isValidColumnId(s.column);
Expand Down