You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(detail): a related list has one sorting semantics instead of two (#3106)
A related list carried two. Its own sort-button row (opt-in via `sortable`) went
out as a server `$orderby` over the whole child collection; the `data-table` it
embeds took `sortable`'s default of `true` and sorted the rows it was holding —
which, in windowed mode, is ONE PAGE.
Turning `sortable` on put both in the same card with nothing saying they meant
different things. Leaving it off — the default — was worse: the page-local sort
was then the only one the user could reach, and it looked exactly like the list
being sorted.
The embedded table's column headers now drive this list's sort in both modes:
- Windowed: the header sort becomes the server `$orderby` and resets to page
one, the same path the buttons took.
- Client mode: this list keeps sorting in memory, where the key is the label
resolved through its own id → name map (#3096) — a key the table cannot see,
so its sort was the worse of the two even where both were possible.
The button row survives only where there are no headers to click: a `list`
(`data-list`) related list, or a caller-supplied `schema` whose contents we
cannot assume. `sortable`'s doc comment now says that is what it controls.
Relational columns keep #3096's rule, moved to the header: withheld while the
sort is a server `$orderby` (the key would be the stored foreign-key id while
the cell shows a name), live in client mode where the key is the label.
Three existing suites asserted through the sort buttons — two on #3096's own
guarantee, one using them as a proxy for column order. They now read the
column's `sortable` flag and drive the table's `onSortChange`, so the
guarantees they encode survive the control that carried them.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments