matteodem / meteor-easy-search

Easy-to-use search for Meteor with Blaze Components
MIT License
437 stars 68 forks source link

2.0.9 Component issue #501

Closed lucased closed 7 years ago

lucased commented 8 years ago

Hi

Ive upgraded to Easy:Search to 2.0.9 but seem to have an issue with some of the components. In 2.0.7 i was able to use {{else}} statements in my templates like below. But now I get 'No results found'. From logging the index.getComponentDict() i can see that stopSubscription is set to true. If i remove the ifSearching and IfNoResults components everything works again.

Is there way around this?

{{> EasySearch.Input index=index attributes=inputAttributes}}

{{#EasySearch.IfSearching index=index}}
    <p>loading...</p>
  {{else}}
    {{#EasySearch.IfNoResults index=index}}
      <div class="no-results"><h4>No results found!</h4></div>
    {{else}}
      {{#EasySearch.Each index=index}}
        <div class="result">{{name}}</div>
      {{/EasySearch.Each}}
    {{/EasySearch.IfNoResults}}
{{/EasySearch.IfSearching}}
matteodem commented 7 years ago

Try not nesting the components, how does it look then?