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: validateDOMNesting warning due decendant of <li> in Pagination component #2416

Closed
wants to merge 2 commits into from

Conversation

alamenai
Copy link

Overview

This pull request aims to solve the bug 2405.

Bug type

  • warning

Description

In the example of documentation :

Pagination>
      <PaginationContent>
        <PaginationItem>
          <PaginationPrevious href="#" />
        </PaginationItem>
        <PaginationItem>
          <PaginationLink href="#">1</PaginationLink>
        </PaginationItem>
        <PaginationItem>
          <PaginationEllipsis />
        </PaginationItem>
        <PaginationItem>
          <PaginationNext href="#" />
        </PaginationItem>
      </PaginationContent>
    </Pagination>

We use the component <PaginationItem> which is a li element to wrap the <PaginationLink> which is also wrapped by <PaginationItem/> internally.

This will produce:

<li>
<li>
....
</li>
</li>

Screenshot

image

image

What's updated

  • Unwrap the <PaginationLink> from <PaginationItem>

Copy link

vercel bot commented Jan 14, 2024

@MenaiAla is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@deven298
Copy link

@MenaiAla @shadcn any chance you can merge and release this soon?

Copy link
Collaborator

@shadcn shadcn left a comment

Choose a reason for hiding this comment

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

Thank you

@shadcn
Copy link
Collaborator

shadcn commented Jan 18, 2024

@MenaiAla We fixed this in #2190. I'm going to close this one but feel free to reopen if you have any questions. Thanks for the PR. Appreciate it.

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