jrquick17 / ionic4-auto-complete

An auto complete compatible with Ionic 2+ and Angular 2+.
https://ionic4-auto-complete.jrquick.com
MIT License
49 stars 37 forks source link

[BUG] ionic5 emptyTemplate and selectionTemplate not working #47

Closed moneycoach2019 closed 4 years ago

moneycoach2019 commented 4 years ago

Hey @moneycoach2019, can you share an example of emptyTemplate and/or selectionTemplate not working? It is working in the custom template demo, code here.

Originally posted by @jrquick17 in https://github.com/jrquick17/ionic4-auto-complete/issues/44#issuecomment-577300083

As stated in the previous bug report where you fixed the time delay problem, in ionic5 the regular template works, but empty or selectionTemplate wont.

Here the examples for emptyTemplate:

  <ng-template #empty let-attrs="attrs">
    <ion-text class="ion-text-right ion-padding-vertical">That country does not exist!</ion-text>
  </ng-template>

          <ion-auto-complete [(model)]="cryptoFrom" [dataProvider]="cryptoPairProvider" [template]="withSymbols" [emptyTemplate]="empty" [options]="{ placeholder : 'From:', debounce: 1 }" style="width:100%"></ion-auto-complete>
jrquick17 commented 4 years ago

This is fixed in v2.5.2.

The empty template was not displaying only when the autocomplete options did not have noItems set.