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 search input clearing (#120) #121

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

Conversation

kvmanas
Copy link

@kvmanas kvmanas commented Feb 29, 2024

Description:

This PR addresses issue #120, where the search input field was persisting its value after opening a new browser tab. It implements the following changes:

Modification:

  1. Created a custom hook (useSessionStorage) to manage data to session storage.
  2. Integrated useSessionStorage into the SearchDialog component.

Impact:

  1. On refresh, session storage maintains state, ensuring the search input remains populated.
  2. On new tab, session storage is cleared, leading to an empty search input.

Copy link

vercel bot commented Feb 29, 2024

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

Name Status Preview Comments Updated (UTC)
vocs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 1, 2024 0:09am

@kvmanas kvmanas changed the title Fix search input clearing on refresh (#120) Fix search input clearing (#120) Feb 29, 2024
Copy link
Member

@tmm tmm left a comment

Choose a reason for hiding this comment

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

Can you add a changeset with pnpm changeset?

@kvmanas
Copy link
Author

kvmanas commented Mar 1, 2024

@tmm added changeset

@holic
Copy link

holic commented Aug 18, 2024

Any chance we can land this or something similar? I still run into this issue regularly with viem docs and it's frustrating!

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