Refreshing the multiselct component without close

Hi All,
So im currently using the multiselect component for a requirement .
But i need to update/refresh the component for new data or properties on the go without closing the dropdown popup.
Currently this happens when i close the dropdown and reopen it.
Is there a way to do that without closing it?
Regards,
Aditya

1 Reply

PM Ponmani Murugaiyan Syncfusion Team December 7, 2020 03:51 PM UTC

Hi Aditya, 

Greetings from Syncfusion support. 

We checked your reported requirement. You can update or refresh the data in Filtering event without closing the popup. Please find the sample below for reference. 

<ejs-multiselect id='games' #sample [dataSource]='sportsData' [allowFiltering]="true" 
(filtering)="onFiltering($event)" [fields]='fields' [placeholder]='waterMark' [popupHeight]='height'> 
</ejs-multiselect> 
 
 
// define the JSON of data 
public sportsData: { [key: string]: Object }[] = [ 
    { Id: "Game1", Game: "American Football" }, 
    { Id: "Game3", Game: "Basketball" }, 
    { Id: "Game4", Game: "Cricket" } 
  ]; 
  public tempDate: { [key: string]: Object }[] = [ 
    { Id: "Game6", Game: "Golf" }, 
    { Id: "Game7", Game: "Hockey" }, 
    { Id: "Game8", Game: "Rugby" }, 
    { Id: "Game9", Game: "Snooker" } 
  ]; 
 
public onFiltering(args): void { 
    this.listObj.dataSource = this.tempDate; 
} 
 


Kindly check with the above sample to meet your requirement. If we misunderstood the query, please revert us with the more information about exact requirement with code snippet.  

Regards, 
Ponmani M 


Loader.
Up arrow icon