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

fix(ui-pagination): fix Pagination sometimes displaying non li elements in lists, fix key errors too #1839

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

matyasf
Copy link
Collaborator

@matyasf matyasf commented Jan 7, 2025

Closes: INSTUI-4422

TEST PLAN:
check all examples in inspector, the pagination buttons should all be in lists. There should be no duplicate key warning in the console

…ts in lists, fix key errors too

Closes: INSTUI-4422

TEST PLAN:
check all examples in inspector, the pagination buttons should all be in lists. There should be no
duplicate key warning in the console
@matyasf matyasf requested review from HerrTopi and balzss January 7, 2025 16:41
@matyasf matyasf self-assigned this Jan 7, 2025
@@ -104,7 +104,7 @@ class Pagination extends Component<PaginationProps> {
currentPage: 1,
siblingCount: 1,
boundaryCount: 1,
ellipsis: <li style={{all: 'unset'}}>...</li>,
Copy link
Collaborator Author

@matyasf matyasf Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this was a bug too, that its a li should be an internal part of the component. Also they need the `key' prop so React doesnt throw warnings

&hellip;
</span>
<li style={{ all: 'unset' }} key="first" aria-hidden="true">
{this.props.ellipsis}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now the ellipsis prop works in the legacy code too

Copy link

github-actions bot commented Jan 7, 2025

PR Preview Action v1.4.8
🚀 Deployed preview to https://instructure.github.io/instructure-ui/pr-preview/pr-1839/
on branch gh-pages at 2025-01-08 09:20 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants