Skip to content

Commit 032e218

Browse files
LukeTowersclaude
andcommitted
Note that inline sorting can't combine with search/filter/pagination/defaultSort
Follow-up to #260: the inline `sortable` option for lists and relations now raises a configuration error when combined with searching, filtering, pagination, or a custom `defaultSort`, since drag-reordering requires the whole list to be shown in a single fixed order. See wintercms/winter#1491. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8dc3976 commit 032e218

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

backend/lists.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ Set `sortable` to `true` to let backend users reorder the list with drag-and-dro
8686
sortable: true
8787
```
8888

89-
When enabled, a drag handle is shown on each row, column header sorting and pagination are disabled (every record is shown in its stored order), and dropping a row persists the new order to the model's sort order column via AJAX.
89+
When enabled, a drag handle is shown on each row, column header sorting is disabled, the list is shown in its stored order without pagination, and dropping a row persists the new order to the model's sort order column via AJAX.
90+
91+
Because the whole list must be visible in a single fixed order, `sortable` cannot be combined with searching, filtering, pagination, or a custom `defaultSort` — configuring any of these alongside it raises a configuration error.
9092

9193
> **NOTE:** Reordering applies to flat lists. For reordering tree structures, or for a dedicated standalone reordering page, use the [Reorder behavior](reorder).
9294

backend/relations.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ authors:
305305

306306
A drag handle is shown on each related record; dropping persists the new order to the pivot's sort order column. Reordering also works while the parent record is being created, before it is saved — the order is stored against the [deferred binding](../database/relations#deferred-binding) and committed together with the record.
307307

308+
As with sortable lists, the related records are shown as a single unpaginated set in their stored order, so `sortable` cannot be combined with searching, filtering, pagination, or a custom `defaultSort` on the relation's `view` configuration.
309+
308310
## Displaying a relation manager
309311

310312
Before relations can be managed on any page, the target model must first be initialized in the controller by calling the `initRelation` method.

0 commit comments

Comments
 (0)