Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IcPaginationBar: If "hideAllFromItemsPerPage" is true and table items is too small, per page display breaks #2843

Closed
GCHQ-Developer-299 opened this issue Nov 29, 2024 · 0 comments
Labels
good first issue A good starter issue if you haven't contributed to the ICDS before
Milestone

Comments

@GCHQ-Developer-299
Copy link
Contributor

GCHQ-Developer-299 commented Nov 29, 2024

Summary of the bug

The Items Per Page display has a small bug where, if the number of items in the table is smaller than the smallest itemsPerPage increment, and hideAllFromItemsPerPage = true, it will display incorrectly:
Screenshot 2024-11-29 at 12 00 22

📸 Screenshots or code

Add the following code to the 'Dev Area' story in canary-web-components ic-data-table's story-data.ts

  dataTable.showPagination = true; // this line already exists, insert the code below it
  const pageOptions = [
    { label: "5", value: "5" }
  ];
  
  dataTable.paginationBarOptions = {
    itemsPerPageOptions: pageOptions,
    showItemsPerPageControl: true,
    showGoToPageControl: true,
    rangeLabelType: "page",
    hideAllFromItemsPerPage: true,
  };

Suggested solution: disable the itemsPerPage control if hideAllFromItemsPerPage = true and items in table is > the smallest PageOption

@GCHQ-Developer-299 GCHQ-Developer-299 added the good first issue A good starter issue if you haven't contributed to the ICDS before label Nov 29, 2024
@GCHQ-Developer-299 GCHQ-Developer-299 added this to the PI 10 V3 milestone Nov 29, 2024
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 3, 2025
…on when the options vary

include the all option when there are fewer items than the available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 3, 2025
…he items per page options vary

include the all option when there are fewer items than the available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 6, 2025
…on when the options vary

include the all option when there are fewer items than the available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 6, 2025
…he items per page options vary

include the all option when there are fewer items than the available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 6, 2025
…he items per page options vary

include the all option when there are fewer items than the available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 6, 2025
…in the IcPaginationBar when there are fewer items than available options

include the all option when there are fewer items than the available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 6, 2025
… in the IcPaginationBar when there are fewer items than available options

include the all option when there are fewer items than the available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 6, 2025
…r items per page dropdown

Show the All option of the items per page dropdown in the IcPaginationBar when there are fewer items
than available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 6, 2025
…er page dropdown

Show the All option of the items per page dropdown in the IcPaginationBar when there are fewer items
than available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 7, 2025
…r items per page dropdown

Show the All option of the items per page dropdown in the IcPaginationBar when there are fewer items
than available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 7, 2025
…er page dropdown

Show the All option of the items per page dropdown in the IcPaginationBar when there are fewer items
than available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 8, 2025
…r items per page dropdown

Show the All option of the items per page dropdown in the IcPaginationBar when there are fewer items
than available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 8, 2025
…er page dropdown

Show the All option of the items per page dropdown in the IcPaginationBar when there are fewer items
than available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 8, 2025
…er page dropdown

Show the All option of the items per page dropdown in the IcPaginationBar when there are fewer items
than available options

fix mi6#2843
dn55533 added a commit to dn55533/ic-ui-kit that referenced this issue Jan 8, 2025
…er page dropdown

Show the All option of the items per page dropdown in the IcPaginationBar when there are fewer items
than available options

fix mi6#2843
@ad9242 ad9242 closed this as completed in 7d62cef Jan 22, 2025
@github-project-automation github-project-automation bot moved this from In Refinement to Done in Intelligence Community Design System Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good starter issue if you haven't contributed to the ICDS before
Projects
Development

No branches or pull requests

1 participant