Clicking the button adds an item to the ObservableCollection that the CollectionView is bound to. The CollectionView has ItemsUpdatingScrollMode="KeepLastItemInView" set. I'm seeing two problems:
Problem 1: When running on Windows, when more items are added than fit in the view, it automatically scrolls to display the new item added. But when running on macOS, it does not automatically scroll, and seems to ignore the ItemsUpdatingScrollMode property.
Problem 2: When running on Windows, holding down control and clicking a selected item deselects it. On macOS, deselection does not seem to work when pressing option-click, control-click, or command-click.
Version info:
% dotnet workload list
Installed Workload Id Manifest Version Installation Source
--------------------------------------------------------------------
maui 8.0.3/8.0.100 SDK 8.0.100
Use `dotnet workload search` to find additional workloads to install.
Steps to Reproduce
Add a CollectionView control to a page in a MAUI app and bind it to an ObservableCollection. Make sure it has the ItemsUpdatingScrollMode="KeepLastItemInView" and HeightRequest="125" properties.
Run the app in macOS and add a bunch of items to the ObservableCollection so there .
Expected: The CollectionView scrolls to keep the last item in view.
Actual: The CollectionView does not scroll.
Click to select an item.
Control-click, option-click, or command-click to deselect the selected item.
Expected: The item is deselected
Actual: Nothing happens
Note that running in Windows returns the expected results, but running in macOS does not.
Description
The CollectionView control's ItemsUpdatingScrollMode does not seem to work on macOS (.NET 8.0.3). In this screenshot:
(screenshot from maui-collectionview-bug repo)
Clicking the button adds an item to the ObservableCollection that the CollectionView is bound to. The CollectionView has
ItemsUpdatingScrollMode="KeepLastItemInView"
set. I'm seeing two problems:Problem 1: When running on Windows, when more items are added than fit in the view, it automatically scrolls to display the new item added. But when running on macOS, it does not automatically scroll, and seems to ignore the ItemsUpdatingScrollMode property.
Problem 2: When running on Windows, holding down control and clicking a selected item deselects it. On macOS, deselection does not seem to work when pressing option-click, control-click, or command-click.
Version info:
Steps to Reproduce
ItemsUpdatingScrollMode="KeepLastItemInView"
andHeightRequest="125"
properties.Expected: The CollectionView scrolls to keep the last item in view. Actual: The CollectionView does not scroll.
Expected: The item is deselected Actual: Nothing happens
Note that running in Windows returns the expected results, but running in macOS does not.
Link to public reproduction project repository
https://github.com/andrewstellman/maui-collectionview-bug/
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
No response
Did you find any workaround?
Unfortunately, no.
Relevant log output
No response