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

Merged
merged 2 commits into from
Feb 3, 2025

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.6.0
Preview removed because the pull request was closed.
2025-02-03 13:06 UTC

@matyasf matyasf merged commit 55b1e3d into master Feb 3, 2025
10 of 11 checks passed
@matyasf matyasf deleted the pagination_fixes branch February 3, 2025 13:06
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.

3 participants