Hi Eliud,
Greetings from Syncfusion support.
With the shared code details, we checked the mentioned issue in
our Blazor ListView component and able to reproduce the issue with the latest
version(V20.3.61). So, we have considered it as a bug on our end. The fix for
this issue will be included in our weekly patch release on January 3, 2023. You
can track the status of the issue's fix using the following feedback link.
Feedback link : https://www.syncfusion.com/feedback/39764/the-getcheckeditemsasync-method-does-not-work-in-the-blazor-listview-component
We have also checked
the workaround way to resolve the reported issue. Check out the below mentioned
code snippets and sample for your reference.
Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/ListView-1744156639.zip
[Index.razor]
<SfListView DataSource="@Data" @ref="List" TValue="DataModel" CssClass=".e-listview" ShowCheckBox="true">
<ListViewEvents TValue="DataModel" Clicked="onClicked"></ListViewEvents>
<ListViewFieldSettings TValue="DataModel" Id="Id" Text="Text" Enabled="Enable"></ListViewFieldSettings>
</SfListView>
public class DataModel
{
…
public bool canChecked { get; set; }
}
public async Task onClicked(ClickEventArgs<DataModel>
args)
{
Data.FirstOrDefault(item =>
item.Id == args.ItemData.Id).canChecked = args.IsChecked;
var checkedItem = Data.Where(item => item.canChecked == true);
}
|
Regards,
Leo Lavanya Dhanaraj