Virtual Scroll + Segments or Search


I noticed that when I add VirtualScroll to two lists which are in different segments, it breaks as soon as I change segment. Here is the code:

<div [ngSwitch]="profile">

    <ion-list [virtualScroll]="pItems" *ngSwitchCase="'profile_1'">
        <button ion-item *virtualItem="let pItem" (click)="goToP(pItem)">{{}}</button>
    <ion-list [virtualScroll]="mItems" *ngSwitchCase="'profile_2'">
        <button ion-item *virtualItem="let mItem" (click)="goToN(mItem)">{{}}</button>


It’s a shame because I have noticed significant performance improvements in non-segmented tests.

In addition to this, the searchbar disappears completely.

Previous code for a segment with search (works well):

<ion-list *ngSwitchCase="'profile_1'">
    <ion-searchbar (ionInput)="filterP($event)" placeholder="Search"></ion-searchbar>
    <button ion-item *ngFor="let pItem of pItems; let i=index" (click)="goToP(pItem)">{{}}</button>

Attempt to use search with VirtualScroll and without segments:

<ion-list [virtualScroll]="pItems">
    <ion-searchbar (ionInput)="filterP($event)" placeholder="Search"></ion-searchbar>
    <button ion-item *virtualItem="let pItem" (click)="goToP(pItem)">{{pItem.raison_sociale}}</button>

Would anyone have any ideas?