ListBox Value not retaining multiple values

I'm trying to track all "checked" items in a list box. However, my property that maintains the values only contains the last item that was checked instead of all items checked. Using the below code, whenever multiple items are checked, the SelectedColumnIdsCurrent array never increases past 1 element.


<SfListBox DataSource="ColumnsCurrent"TItem="ViewColumn"TValue="Guid[]" @bind-Value="SelectedColumnIdsCurrent">
    <ListBoxSelectionSettings ShowCheckbox="true"/>
    <ListBoxFieldSettings Text="Header"Value="Id"/>
</SfListBox>


@SelectedColumnIdsCurrent.Length

@code {
public class ViewColumn
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Header => Name;
}
IList ColumnsCurrent { get; set; } = new List()
{
new ViewColumn() { Id = Guid.NewGuid(), Name="Column A" },
new ViewColumn() { Id = Guid.NewGuid(), Name="Column B" },
new ViewColumn() { Id = Guid.NewGuid(), Name="Column C" },
new ViewColumn() { Id = Guid.NewGuid(), Name="Column D" },
new ViewColumn() { Id = Guid.NewGuid(), Name="Column E" },
};
Guid[] SelectedColumnIdsCurrent = new Guid[0];
}​​



2 Replies

YA YuvanShankar Arunagiri Syncfusion Team June 13, 2022 02:23 PM UTC

Hi Jeff,


We have validated your reported query and it was known issue in our end. We will resolve this issue in our volume 2 release, which was schedule on the end of the June 2022. We appreciate your patience until then.


Regards,

YuvanShankar A



YA YuvanShankar Arunagiri Syncfusion Team July 1, 2022 10:20 AM UTC

Hi Jeff,


We are glad to announce that our Essential Studio 2022 Volume 2 release v20.2.0.36 is rolled out. We have included the fix for this issue in this release and is available for download under the following link.


https://www.syncfusion.com/forums/175975/essential-studio-2022-volume-2-main-release-v20-2-0-36-is-available-for-download


Release notes: https://blazor.syncfusion.com/documentation/release-notes/20.2.36?type=all#listbox


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Regards,

YuvanShankar A


Loader.
Up arrow icon