List View with checkboxes doesnt tick other checkboxes if the first check box is checked by code

Hello,

There is a very strange issue with SfList checkboxes.
If I set the first item in the list to be checked all other items are unchecked. 
This is a blocking issue in our application when we try to set listview checkboxes based on saved configuration etc

Please see the screenshot and basic code sample below
Regards
Vincent



Code
@page  "/cbx2"

@using Syncfusion.Blazor.Buttons
@using Syncfusion.Blazor.Lists
    <h2>I am list one I should have 3 items ticked in position 1,2,3</h2>
<SfListView DataSource="@Data" ShowCheckBox="true">
    <ListViewFieldSettings TValue="DataModel" Id="Text" Text="Text" IsChecked="IsSelected"></ListViewFieldSettings>
</SfListView>

<h2>I am list two I should have 3 items ticked in position 2,3,4</h2>
<SfListView DataSource="@Data2" ShowCheckBox="true">
    <ListViewFieldSettings TValue="DataModel" Id="Text" Text="Text" IsChecked="IsSelected"></ListViewFieldSettings>
</SfListView>

@code {

    private DataModel[] Data = {

        new DataModel { Text ="Hennessey Venom", Id = "list-01", IsSelected = true  },
        new DataModel { Text = "Bugatti Chiron", Id = "list-02", IsSelected = true  },
        new DataModel { Text = "Bugatti Veyron Super Sport", Id = "list-03", IsSelected = true },
        new DataModel { Text = "SSC Ultimate Aero", Id = "list-04" },
        new DataModel { Text = "Koenigsegg CCR", Id = "list-05" },
        new DataModel { Text = "McLaren F1", Id = "list-06" },
        new DataModel { Text = "Aston Martin One- 77", Id = "list-07"},
        new DataModel { Text = "Jaguar XJ220", Id = "list-08" },
        new DataModel { Text = "McLaren P1", Id = "list-09" },
        new DataModel { Text = "Ferrari LaFerrari", Id = "list-10" }

    };

    private DataModel[] Data2 = {

        new DataModel { Text ="Hennessey Venom", Id = "list-01" },
        new DataModel { Text = "Bugatti Chiron", Id = "list-02", IsSelected = true   },
        new DataModel { Text = "Bugatti Veyron Super Sport", Id = "list-03", IsSelected = true },
        new DataModel { Text = "SSC Ultimate Aero", Id = "list-04", IsSelected = true   },
        new DataModel { Text = "Koenigsegg CCR", Id = "list-05" },
        new DataModel { Text = "McLaren F1", Id = "list-06" },
        new DataModel { Text = "Aston Martin One- 77", Id = "list-07"},
        new DataModel { Text = "Jaguar XJ220", Id = "list-08" },
        new DataModel { Text = "McLaren P1", Id = "list-09" },
        new DataModel { Text = "Ferrari LaFerrari", Id = "list-10" }

    };

    class DataModel
    {
        public string Text { get; set; }
        public string Id { get; set; }
        public bool IsSelected { get; set; }

    }
}

3 Replies 1 reply marked as answer

VM Vincent McCarthy October 29, 2020 06:32 PM UTC

Just to post some more information on this to further illustrate the problem.
In chrome the code below will display the second list ok but the first list displays the first 3 checked for half a second and then only leaves the first checkbox checked.

Also, looking at the code- the example below should have different ids (list2-01 etc) for the second list for correctness (I cant edit the previous comment for some reason). (But the second list is only for illustrative purposes anyway)


SP Sowmiya Padmanaban Syncfusion Team October 30, 2020 11:42 AM UTC

Hi Vincent McCarthy,  
 
Greetings from Syncfusion support. 
 
We have checked your reported problem with ListView component. This is already known issue from our end.  
 
We will include the fix for this issue in our first weekly patch release, which rolls out after Volume 3 SP release which is expected to be rolled out within mid of November, 2020.  
  
Please, track the following feedback link to know the status of this fix. 
  
 
We appreciate your patience.  
  
Regards,  
Sowmiya.P 




SP Sowmiya Padmanaban Syncfusion Team November 12, 2020 07:51 AM UTC

Hi Vincent McCarthy, 
 
Thanks for your patience. 
 
We are glad to announce that our patch release (V18.3.48) is rolled out successfully. In this release, we have included fix  for “Checked items is not maintained in ListView component”. To access this fix, we suggest you to update the package to the latest version (V18.3.48). 
 
Please, refer the below sample link for your requirement. 
 
 
Please get in touch with us if you would require any further assistance. 
 
Regards, 
Sowmiya.P 


Marked as answer
Loader.
Up arrow icon