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

Bug - Table -> React demos -> Sortable-responsive - incorrect pagination in readme demo #9834

Closed
keckrich opened this issue Nov 21, 2023 · 2 comments · Fixed by #10170
Closed
Assignees
Labels
Milestone

Comments

@keckrich
Copy link

Describe the problem
In the readme under Tables -> React demos -> Sortable - responsive in the React.useEffect
setSortedRows(sortedData.slice((page - 1) * perPage, page * perPage - 1)); should be setSortedRows(sortedData.slice((page - 1) * perPage, page * perPage)); because slice end is exclusive. The demo code says the pagination is pages 1-10 but only shows nine results.

Expected behavior
The example code should be changed to

React.useEffect(() => { 
    setSortedRows(sortedData.slice((page - 1) * perPage, page * perPage));
}, [sortedData, page, perPage]);

What is your environment?

  • Readme: Release 5.1.0
@keckrich keckrich added the bug label Nov 21, 2023
@github-project-automation github-project-automation bot moved this to Needs triage in PatternFly Issues Nov 21, 2023
@wise-king-sullyman wise-king-sullyman moved this from Needs triage to Backlog in PatternFly Issues Nov 28, 2023
@wise-king-sullyman
Copy link
Contributor

Thanks for reporting this issue! The team will address when able.

Copy link

stale bot commented Jan 30, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jan 30, 2024
@stale stale bot closed this as completed Feb 13, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in PatternFly Issues Feb 13, 2024
@github-project-automation github-project-automation bot moved this from Done to Needs triage in PatternFly Issues Feb 26, 2024
@stale stale bot removed the wontfix label Feb 26, 2024
@wise-king-sullyman wise-king-sullyman moved this from Needs triage to Backlog in PatternFly Issues Feb 26, 2024
@kmcfaul kmcfaul moved this from Backlog to Not started in PatternFly Issues Mar 13, 2024
@tlabaj tlabaj modified the milestones: Prioritized Backlog, 2024.Q1 Mar 13, 2024
@adamviktora adamviktora moved this from Not started to PR Review in PatternFly Issues Mar 18, 2024
@github-project-automation github-project-automation bot moved this from PR Review to Done in PatternFly Issues Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants