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

bug: Fix search result cycling when using different search term #6

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

ngshiheng
Copy link
Contributor

Hi there! thanks for making this great tool!

Bug

I found a subtle bug in the search functionality. Basically when I hit the "Enter" key with the search term "first_dep" and then change my search term to "second_dep", hitting the "Enter" key again would still cycle me through the results of "first_dep"

NOTE: this doesn't happen if i were to manually click the search icon

Fix

The fix i made was pretty straightforward -- i added a lastSearch term to track changes in the search input
The code now correctly handles transitions between different search terms when hitting "Enter" key

@bayraktugrul
Copy link
Owner

Hi @ngshiheng, nice catch! The changes definitely improved it. Thank you for your contribution.

@bayraktugrul bayraktugrul merged commit fe665c3 into bayraktugrul:main Nov 30, 2024
1 check passed
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.

None yet

2 participants