Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Search on onkeyup? #6

Open
zzrez opened this issue Jul 23, 2019 · 0 comments
Open

Search on onkeyup? #6

zzrez opened this issue Jul 23, 2019 · 0 comments

Comments

@zzrez
Copy link

zzrez commented Jul 23, 2019

Am reading your tutorial https://assortment.io/posts/gatsby-site-search-lunr-js where you ask for feedback. Hope here is OK. The tutorial is excellent. I have made a version of the blog with more text and frontmatter to check out functionality.

I noticed that mostly you have to type a full word in the search box before results are triggered. Just a few exceptions showed results before, eg entering "sweep" showed a record with "sweeping", and "privat" showed record with "private". But you must enter the entire word to get a record with "peninsula". Is there any way to trigger search after each onkeyup instead?

Subject to the above, the Submit button seems unnecessary as results appear when typing in the search term.

One last finding on search: once the search is triggered and results appear, if you carry on typing these results do not change. This is not desirable. For example one record has "look no further", another has "looking". Both appear after entering "look" but stay there after extending the search to "look further". Is there an easy solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant