Open Fringie opened 1 year ago
I may have managed to resolve the issue on my local code. I'm still testing it but it seems to be working. The problem is the _onSearch event, I removed the if statement that stops it running if there's no queryText.
I don't know how to do pull requests on github
Edit: my fix worked. Seems to be no issues in my testing.
@Fringie here's one guide https://opensource.com/article/19/7/create-pull-request-github, and you should be able to find many on the interwebs.
@Fringie here's one guide https://opensource.com/article/19/7/create-pull-request-github, and you should be able to find many on the interwebs.
Thank you, I will give it a try just now.
Tried on the dev branch and seems to reset ok when using "*" as the default query. Both with suggestions on and off.
If you have the search box and result web part on the same page, why do you enable "Send the query to a new page"? You can probably turn off "Reset query on clear" as well, as the static query takes effect.
Version used 4.8 Describe the bug When you empty/clear the search box, the search results webpart does not update with the default value if you have query suggestions enabled, if you disable query suggestions the functionality works. I think query suggestions disables the search box if there is no input which is causing the bug. Video example - https://www.youtube.com/watch?v=rBEOMPZMmOY
For example:
My webparts are configured to display everything via the * wildcard, so if there is nothing in the search box, everything should be displayed. But if i turn on query suggestions, it will stop working:
To Reproduce (one time setup)
Expected behavior I expect that the default search results will be displayed when the search box is empty.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): Windows 11. Chrome
Additional context This issue only happens when you try to use custom search suggestions, if you turn that feature off the functionality works as expected. Video example - https://www.youtube.com/watch?v=rBEOMPZMmOY