Skip to content

Data View: Pagination error on manual input #55937

@andrewhayward

Description

@andrewhayward

Relates to #55083.

What?

When manually entering a page number in the pagination control, an invalid page number incorrectly enables the previous pagination controls, allowing the user to "access" pages below 1.

Expectations

When manually entering a page number, an invalid number should be reset to within range, and the pagination controls should be enabled appropriately:

  • If it is reset to the first page, the previous controls should be disabled.
  • If it is reset to the last page, the next controls should be disabled.
  • If it is reset to both (that is, there is only one page), both the previous and next controls should be disabled.

Reproduction

  1. Navigate to the pagination control, and enter a page number out of range (e.g. 0).
    A set of greyed-out pagination controls, with a text box reading "0"
  2. Note that the value will reset to a number within range (e.g. 1), but that the "First page" and "Previous page" buttons will be enabled.
    A set of pagination controls, the double-left and single-left arrows enabled, with a text box reading "1"
  3. Pressing the "First page" button will reset appropriately to the first page
    A set of greyed-out pagination controls, with a text box reading "1"
  4. Pressing the "Previous page" button will move backwards through non-existent pages
    A set of pagination controls, all enabled, with a text box reading "-7"
manual.pagination.error.mov

Metadata

Metadata

Assignees

Labels

[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions