Multiselect dropdown bind-value always null

Hi,

Following the example in your docs:

https://blazor.syncfusion.com/documentation/multiselect-dropdown/data-source#valuetuple-data-binding

If you then associate a bind-value to save the select values, when you change your selected values, visually works fine but the bind-value it will always be null array/list.

Also is worth note that, if you fill the bind-value initially, it succeeds in present them as selected only when you change the values it will make the array/list null.

Is there anything missing? Can you provide a working sample?

Regards


3 Replies

SP Sureshkumar P Syncfusion Team March 9, 2022 05:16 AM UTC

HI Ricardo,   
Thanks for your shared information. We have confirmed the reported issue is an issue at our end and this fix will be included in our upcoming Volume 1, 2022 release, which is expected to be rolled out on end of March 2022.  
You can track the status of this issue from the below feedback.  
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization 

Regards,  
Sureshkumar P 



UN Unknown February 17, 2023 03:45 PM UTC

any updates on this ?



SP Sureshkumar P Syncfusion Team February 20, 2023 06:45 AM UTC

Hi Christoph,

Sorry for the inconvenience caused. We have created a sample level solution for your reported problem. Please see the code and sample below for your reference.

<SfMultiSelect TItem="(string, string)" @bind-Value="@MultiVal" Width="250px" TValue="string[]"

               DataSource="@Data1">

    <MultiSelectFieldSettings Text="Item1" Value="Item2" />

</SfMultiSelect>

 

@code {

 

    public List<(string, string)> Data1 = Enum.GetValues(typeof(DayOfWeek)).Cast<DayOfWeek>().Select(v => new ValueTuple<string, string>

        {

            Item1 = v.ToString(),

            Item2 = ((int)v).ToString()

        }).ToList();

 

    string[] MultiVal { get; set; } = { "1" };

}


Find the sample in the attachment:

Regards,

Sureshkumar P


Attachment: Multiselect_2db06920.zip

Loader.
Up arrow icon