Issue with DropDown Multiple Select

Hello,
I am trying to mirror your example regarding multiple select in a DropDown component:

This is the code of my DropDown component:

<RadzenDropDown TValue="string" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" AllowFiltering="true" class="w-100"
            Placeholder="Select..." Multiple=true Chips=true Name="Location" @bind-Value=@selectedPlants Data=@cpiEntities TextProperty="CompanyName" ValueProperty="Company" AllowSelectAll="false" MaxSelectedLabels="4" TabIndex="7" />

And this is the code behind:

protected IEnumerable<EntityDto> cpiEntities;
protected IList<string> selectedPlants;

 protected override async Task OnInitializedAsync()
 {

     selectedPlants = new string[] { "DE0100", "FR0211" };

     cpiDivisions = await DataService.GetCpiDivisions();
     cpiClusters = await DataService.GetCpiClusters();
     cpiSubClusters = await DataService.GetCpiSubClusters();
     cpiEntities = await DataService.GetCpiEntities();

 }

Any idea what I am doing wrong?

Thank you.

Forgot to add the errors I get:

If I remove the @bind-Value from the dropdown, the app runs as expected.

Should be IEnumerable of something not simple type. Better remove this declaration, Blazor will get it from @bind-Value.

Hi Enchev,

That worked.
Thank you very much for your help.