Skip to content

If there a way to prevent searching when querystring is empty? #54

@mingfang

Description

@mingfang

This is my search input

  <input placeholder="Search" type="text" eui-query="ejs.MatchQuery('line', querystring)" ng-model="querystring" eui-enabled="querystring.length" />

This work during startup since eui-enabled will be false.
However, after doing a search and then subsequently clearing the search input, the result is another search using an empty query.

My workaround is to surround the result display with this

    <div ng-if="indexVM.query">
      <ul>
          <li ng-repeat="doc in indexVM.results.hits.hits">
...
          </li>
      </ul>
    </div>

Ideally I want to avoid the search completely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions