How to stop redirection with blank search term

How can I stop redirection when I press in the search field?

I want to stop it because pressing enter without entering anything in the field redirects to the result page and shows all the result. I want the redirection only with a valid value in the search field.

I have figure it out. query_filter works fine to control the behavior before search.

_st('install', '<INSTALL KEY>', null, {
            hooks: {
                query_filter: function (query) {
                    return !!query.getQueryText();
                }
            })
1 Like