ElasticUI icon indicating copy to clipboard operation
ElasticUI copied to clipboard

prohibit triggering a query when the query is null in the indexVM

Open mastermind1981 opened this issue 10 years ago • 1 comments

This pull will prohibit launching search when the query is null Object is null. With this pull we will be able to have a page with eui-filter with a eui-enabled = true without triggering a search when we didn't already have a query and with indexVM.false.

Besides that, no search will be triggered when other attributes of indexVM are changed if the query is null.

In the added code there is a special case when we launch the search even if the query is null, when it's old value is not null. The scenario is this:

  1. User enter a query string and launch the search.
  2. User gets the result.
  3. User remove the query and launch the search.
  4. User gets all the results.

This scenario will work with pull.

To prevent triggering the search on page load ng-init="indexVM.autoLoad = true" must be added.

mastermind1981 avatar May 25 '15 16:05 mastermind1981

@YousefED could you please check the pull, i don't now if ti will compile fine in ts ?

mastermind1981 avatar May 25 '15 16:05 mastermind1981