Open DadoGit00 opened 3 years ago
can you provide more information?, please.
Hi, I am having the same problem, using v5. Using the selectable, the list of elements can be displayed. However, when added [canSearch]="true", searchbar was not displayed. May i know if canSearch currently can be used in v5?
Updated (solution for me that works) : I am using ionic selectable v4 in ionic 5.
I have same issue on ionic 5
My temporary solution for searchbar is to manually implement the searchbar in header template and search function since the component has no search method.
<ng-template ionicSelectableHeaderTemplate>
<ion-row class="ion-no-padding">
<ion-col class="ion-no-padding" size="12">
<ion-toolbar>
<ion-buttons [slot]="ionicSelectableComponent.closeButtonSlot">
<ion-button (click)="ionicSelectableComponent.close()">
{{ionicSelectableComponent.closeButtonText}}
</ion-button>
</ion-buttons>
<ion-title>
{{ionicSelectableComponent.titleText}}
</ion-title>
</ion-toolbar>
</ion-col>
<ion-col class="ion-no-padding" size="12">
<ion-card>
<ion-card-content class="ion-no-padding">
<ion-item lines="none">
<ion-icon slot="start" name="search-outline"></ion-icon>
<ion-input (ionInput)="itemSearch($event)"></ion-input>
</ion-item>
</ion-card-content>
</ion-card>
</ion-col>
</ion-row>
</ng-template>
You will need to use template variable ionicSelectableComponent.
The component does not have label, but with different name called titleText.
Hope this helps someone that tries to use searchbar. The search function can refer to Search items asynchronously.
Hi, my selectable works, i can view every element correctly. Everything works fine except for the attribute [canSearch]="true" which doesn't make appear the searchbar. Version: 5.0.0