-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat: clear all tags in one click button added in search page #10032
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! It looks like the only file with relevant changes for this issue is search.js
Can you please remove tags and your package lock file from this PR?
20b3e7c
to
40f672a
Compare
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! During testing the clear function worked well if I used tags only. If I type in my search it would remove all values but the first word. I have created a video to illustrate what I mean.
testing.mov |
pages/search.js
Outdated
@@ -203,6 +202,31 @@ export default function Search({ | |||
); | |||
}; | |||
|
|||
const handleClearFilter = () => { | |||
const params = new URLSearchParams({ query: searchTerm }); | |||
params.forEach((e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find e a bit ambiguous, consider renaming it to a more descriptive and meaningful name. This can enhance code readability and understanding. Choose a name that reflects the purpose or content of the variable to make the code more self-explanatory.
7d4efc4
to
2b41cba
Compare
I've fixed this issue |
… have searched something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, works well. I left an inline comment
4e46537
to
4d034b4
Compare
Fixes Issue
Closes #9839
Changes proposed
Check List (Check all the applicable boxes)
Screenshots
clearfilter.webm