I set up an infinite scrolling logic on a CollectionView
where IsGrouped = True
. It works as expected on Android, but from the very beginning it never worked on iOS, Windows and MacCatalyst (as the command doesn't execute at all on these platforms). Now data to retrieve from the cloud for my application are becoming massive and I can't afford loading everything at once in my collection anymore.
Is there anything I can do to solve this issue? Or (if this is just a bug) is there any workaround I can apply to avoid setting a button to load pages one by one?
Here's the XAML code:
<Grid
Grid.Row="3"
VerticalOptions="Fill">
<CollectionView
ItemsSource="{Binding ListItemsGroup}"
SelectionMode="Single"
SelectedItem="{Binding CurrentItem, Mode=TwoWay}"
RemainingItemsThreshold="2"
RemainingItemsThresholdReachedCommand="{Binding LoadMoreItemsCommand}"
IsGrouped="True">
Yes, this is a known issue that being tracked in the links below, you can follow up there.
https://github.com/dotnet/maui/issues/10078
https://github.com/dotnet/maui/issues/13391
The command RemainingItemsThresholdReachedCommand
only works on Android but does not work on iOS or Windows, i.e. Scrolling has no effect and a breakpoint set in the Command RemainingItemsThresholdReachedCommand
is never being called.