Commit db13a60
authored
fix(ui): list drawer per-page dropdown resets to 10 instead of showing saved limit (#14830)
### What?
The per-page dropdown in ListDrawer always shows 10 on open, even when
the user has previously saved a different preference (e.g., 5). However,
the correct number of items is fetched and displayed, so only the
dropdown UI is wrong.
### Why?
ListDrawer doesn't use URL query params like regular collection pages.
The server correctly uses the saved preference to fetch data and returns
`data.limit`, but `query.limit` is always undefined in the
ListQueryProvider. When PageControls tries to determine the limit, it
falls back to the hardcoded default of 10 because it can't access the
actual limit used by the server.
### How?
Pass `defaultLimit: data?.limit` in the ListQueryProvider context. This
exposes the server's actual limit to PageControls, which then forwards
it to the PerPage component. Now the dropdown displays the correct saved
preference.
Fixes #147601 parent 617311a commit db13a60
File tree
2 files changed
+47
-0
lines changed- packages/ui/src/providers/ListQuery
- test/admin/e2e/list-view
2 files changed
+47
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1598 | 1598 | | |
1599 | 1599 | | |
1600 | 1600 | | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
1601 | 1647 | | |
1602 | 1648 | | |
1603 | 1649 | | |
| |||
0 commit comments