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

Improve Search Bar #41

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

MokshagnaV
Copy link
Contributor

#34 Added react-select for Search for suggestions

@vercel
Copy link

vercel bot commented Oct 16, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @suryanshsingh2001 on Vercel.

@suryanshsingh2001 first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 16, 2023

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

Name Status Preview Comments Updated (UTC)
mylibrary ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2023 9:34am

Copy link
Owner

@suryanshsingh2001 suryanshsingh2001 left a comment

Choose a reason for hiding this comment

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

All things sorted. And could you please explain what does the toastId part of the code do.

@suryanshsingh2001 suryanshsingh2001 added bug Something isn't working hacktoberfest-accepted Only for hacktoberfest based contributions labels Oct 16, 2023
@MokshagnaV
Copy link
Contributor Author

All things sorted. And could you please explain what does the toastId part of the code do.

Yes. I have used toastify to notify the errors. When there is any error occurs while typing in the search bar the error will be notified using toastify. But on each change in search bar multiple times the api is called so, many times the toast will display (in case of error).

Therefore, to reduce the multiple toast notification at once. I use toastId. This variable will store the id of currently displaying toast and checks whenever another toast is going to call. If the toastId is active. If it is active, no new toast will display, else new Toast will display.
Means a new Toast will be displayed whenever no toast is already active

@suryanshsingh2001 suryanshsingh2001 merged commit 7f77d9b into suryanshsingh2001:main Oct 16, 2023
2 checks passed
@suryanshsingh2001
Copy link
Owner

Therefore, to reduce the multiple toast notification at once. I use toastId. This variable will store the id of currently displaying toast and checks whenever another toast is going to call. If the toastId is active. If it is active, no new toast will display, else new Toast will display.

Thank you for going through all the trouble! You did a good job in improving the search bar.

@MokshagnaV
Copy link
Contributor Author

Therefore, to reduce the multiple toast notification at once. I use toastId. This variable will store the id of currently displaying toast and checks whenever another toast is going to call. If the toastId is active. If it is active, no new toast will display, else new Toast will display.

Thank you for going through all the trouble! You did a good job in improving the search bar.

You're very welcome! I'm glad that my work has been helpful to you. I'm here to help for any further issues!

Thank you.

@MokshagnaV MokshagnaV deleted the mokshagnav branch October 16, 2023 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest-accepted Only for hacktoberfest based contributions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants