Skip to content

Narrow search by specific attributes #6266

Answered by joshpalmeroc
joshpalmeroc asked this question in Q&A
Discussion options

You must be logged in to vote

I figured out my problem again.

useSearchbox returns the existing query
My form field has the value in state for that field

        const value = data[name]; // the form input value ("tech")
        let newQuery = query.replace(value, '').trim(); // replacing the existing queries text with nothing
        refine(newQuery); // refine again with useSearchbox

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@joshpalmeroc
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by joshpalmeroc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant