MultipleSelect Dropdown binds values, but Selection becomes imposible

Hi Syncfusion, I have a MultipleSelect dropdown showing master data, just a simple list of Value: PlantTechnicalFeaturesAndStructuresId (int) and Text: MemberName (string} of objects:

Public class PlantTechnicalFeaturesAndStructureModel
{
    public int PlantTechnicalFeaturesAndStructuresId { get; set; }
    public string MemberName { get; set; }
}

Here my MultipleSelect dropdown code:

<SfMultiSelect TValue="int[]" TItem="PlantTechnicalFeaturesAndStructureModel" DataSource="@plantTechnicalFeaturesAndStructures" @bind-Value="plantPlantTechnicalFeaturesAndStructures"
   Mode="@VisualMode.CheckBox"  ShowDropDownIcon="true" ShowSelectAll="true" AllowFiltering="true"
   SelectAllText="Select All" UnSelectAllText="Un-select All" Placeholder="Please select feature(s)">
<MultiSelectFieldSettings Text="MemberName" Value="PlantTechnicalFeaturesAndStructuresId"></MultiSelectFieldSettings>
<MultiSelectEvents TValue="int[]" TItem="PlantTechnicalFeaturesAndStructureModel" ValueChange="@((args)=>OnPlantTechnicalFeaturesAndStructuresChanged(args,plant))"></MultiSelectEvents>
</SfMultiSelect>

DataSource related code:
private List<PlantTechnicalFeaturesAndStructureModel> plantTechnicalFeaturesAndStructures;

protected override async Task OnInitializedAsync()
{
plantTechnicalFeaturesAndStructures = await plantFeaturesService.GetPlantTechnicalFeaturesAndStructures();
}

bind-Value related code:
int[] plantPlantTechnicalFeaturesAndStructures = plant.PlantPlantTechnicalFeaturesAndStructures.Select(pf => pf.PlantTechnicalFeaturesAndStructuresId).ToArray();

resulting in an array of integers, representing selected PlantTechnicalFeaturesAndStructureModel objects

This works fine, but selecting other list values in the control seems te be imposible!
Looks like the control is in some kind of read-only state.
See image in attatchment







Attachment: Multiple_select_unselectable_419088b8.rar

1 Reply 1 reply marked as answer

GG Gopi Govindasamy Syncfusion Team January 14, 2021 05:49 AM UTC

Hi Joost,  

Greetings from Syncfusion support.  

We have checked your issue and unfortunately the reported issue not able to reproduced in our end. We suspect you have updated the component value property in ValueChange event, so the value is not unselected while click the list item. We prepared the sample based on the shared code snippet, please find the attached sample. 


Kindly check with the above sample. If we misunderstood the query, please revert us with the below details.  

  1. Provide the code snippet for ValueChange event.
  2. If possible try to replicate the issue in the above provided sample.
 
Regards,  
Gopi G. 


Marked as answer
Loader.
Up arrow icon