eakoriakin / ionic-selectable

Ionic Selectable is an Ionic versatile and highly customizable component that serves as a replacement to Ionic Select, and allows to search items, including async search, create items, customize the layout with templates and much more. It provides an intuitive API and is easy to set up and use.
MIT License
549 stars 125 forks source link

shouldFocusSearchbar isn't a know property of ionic-selectable #363

Open minitoma opened 2 years ago

minitoma commented 2 years ago

Hi there, i don't know why but i'm trying to use the shouldFocusSearchbar but it seems that it doesnt work. Can anyone tell me what i'm doing wrong ? I'm using ionic-selectable 3.5.0

This is the error :

Uncaught Error: Template parse errors:
Can't bind to 'shouldFocusSearchbar' since it isn't a known property of 'ionic-selectable'.
1. If 'ionic-selectable' is an Angular component and it has 'shouldFocusSearchbar' input, then verify that it is part of this module.
2. If 'ionic-selectable' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("eholder="{{ 'APP.GENERAL.SELECTED.LIST.ALL_SELECTED' | translate }}"

            [canClear]="true" [ERROR ->][shouldFocusSearchbar]="true">

            <ng-template ionicSelectableTitleTemplate>

Here is my ionic-selectable div :

<ionic-selectable formControlName="POINTEUR" #pointeurComponent item-content [(ngModel)]="pointeur"
            [items]="REF_POINTEURS" itemValueField="COPOIN" itemTextField="LIBELLE" [canSearch]="true"
            (onOpen)="onOpen($event)" (onSearch)="searchPointeur($event)"
            placeholder="{{ 'APP.GENERAL.SELECTED.LIST.ALL_SELECTED' | translate }}" [canClear]="true" [shouldFocusSearchbar]="true">

Thanks for the help !