Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

customize ionic searchable component

I'm using basic ionic searchable component and it's working fine,

<ion-item>
    <ion-label>Port</ion-label>
    <select-searchable
        item-content
        [(ngModel)]="port"
        [items]="ports"
        itemValueField="id"
        itemTextField="name"
        [canSearch]="true"
        (onChange)="portChange($event)">
    </select-searchable>
</ion-item>

The problem is that I've a pretty big array, around 8k records, and it loads really slow, how can I overcome that? any ideas? Can I display a small chunk of the data but still search in the whole array? thanks.

here's the component I'm working with. https://www.npmjs.com/package/ionic-select-searchable

like image 733
Mohamed Gabr Avatar asked Aug 12 '26 07:08

Mohamed Gabr


1 Answers

This issue arises due to some reasons like,

  1. If your database is slow then you will get this issue.
  2. Due to outdated ionic version
  3. Due to fetching a high amount of data at a time

For further reference follow those links below

https://github.com/ionic-team/ionic/issues/12558 https://github.com/ionic-team/ionic/issues/10087

like image 154
Balakrishnan Bsk Avatar answered Aug 15 '26 12:08

Balakrishnan Bsk