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: Doc Search outside click not hiding search hits #11925

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

blan19
Copy link
Contributor

@blan19 blan19 commented Sep 30, 2024

☕️ Reasoning

Currently, a search hits view is persisting when clicking outside Doc Search component.

I've modified it so that when clicking outside the Doc Search component, the view is no longer returned while still maintaining the query.

{isSearchHitsVisible && (
  <NoResultsBoundary>
    <Hits
        hitComponent={Hit}
        className="fixed left-2 top-28 z-50 mt-[50px] max-h-[calc(100dvh_-_120px)] w-[calc(100vw_-_16px)] overflow-y-auto rounded-md bg-neutral-100 shadow-lg md:absolute md:left-auto md:right-0 md:top-12 md:mt-auto md:w-96 dark:bg-neutral-800 [&>ol]:flex [&>ol]:flex-col [&>ol]:divide-y [&>ol]:divide-neutral-400/30 [&>ol]:dark:divide-neutral-900/50"
      />
  </NoResultsBoundary>
)}

// search hits view is no longer returned
// but maintaining a query

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

#11893

📌 Resources

Copy link

vercel bot commented Sep 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 3:25am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Sep 30, 2024 3:25am

Copy link

vercel bot commented Sep 30, 2024

Someone is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize 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.

1 participant