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
550 stars 123 forks source link

ionic-selectable not working with ionic 7 #442

Closed gopikasingh closed 9 months ago

gopikasingh commented 10 months ago

Ionic-selectable does not seem to be working with ionic 7. I tried installing all the 5.0.0 and above packages. I keep getting the error (in app.module.ts) that Module '"ionic-selectable"' has no exported member 'IonicSelectableModule'.

Is anyone else facing the same issue, and how can it be resolved? Any help would be greatly appreciated.

SimonFavraud commented 10 months ago

I managed to use the plugin by downgrading to the 4.9.0 version

Mersal-Mohamed2 commented 9 months ago

this happen to me and down grade to 4.9.0 this error Module '"ionic-selectable"' has no exported member 'IonicSelectableModule'. gone but i dont have any elements in the pop up only the header title

this is my code

`<ionic-selectable #selectableComponent [ngClass]="{'disabled': isDisabled}" [isEnabled]="!isDisabled" *ngIf="control && items" [formControl]="control" [items]="items" [itemValueField]="itemValueField" [shouldStoreItemValue]="shouldStoreItemValue" [itemTextField]="itemTextField + '_' + translationService.currentLang" [canSearch]="true" [isOnSearchEnabled]="true" [placeholder]="placeholder" closeButtonText="{{'Close' | translate}}" searchPlaceholder="{{'Search' | translate}}" (onSearch)="search($event)" [hasVirtualScroll]="true" virtualScrollApproxItemHeight="48px">

</app-custom-header>

{{items | arrayFind: itemValueField : value | translateField: itemTextField}} {{(item | translateField: itemTextField)}} {{'Confirm' | translate | titlecase}}

`

TheSakyo commented 9 months ago

import with IonicSelectableComponent directly : import { IonicSelectableComponent } from 'ionic-selectable';

if you're using ngModule, you'll need to import it in the 'declarations' or 'imports' section (i can't remember where to put it 😅); otherwise, if you're using standalone, you'll need to import it directly in the Component decorator in the 'imports' section.

gopikasingh commented 9 months ago

Thanks everyone, unfortunately I can't downgrade ionic-selectable as I'm using rxjs 7.5.0 and ionic-selectable is not compatible with that. I had found an alternative for it that perfectly works with ionic-7 and angular version 16. Thanks for the responses!

asad-96 commented 9 months ago

Is there any updated on this?

asad-96 commented 9 months ago

So here is the solution.