Closed Bhupesh-V closed 4 years ago
I think a better way would be to handle searches similar to how search engines handle them.
If the input is empty, we don't submit the form to the back-end.
Something like:
HTML:
<form onsubmit="return checkEmpty()" method="get">
.
.
.
</form>
JS:
function checkEmpty() {
var input = document.getElementById("search-bar");
if (input.value == "" || input.value == null) {
return false;
}
else {
return true;
}
}
This is the solution thread.
Should I open a PR?
I have done the same implementation The submit buttons remains disabled until unless there is a string in input box
So... wontfix?
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Submit
buttonExpected behavior Search should not appear until unless there is a Search string