maui
maui copied to clipboard
Fixed [Windows] KeepScrollOffset Behavior Not Working as Expected in CarouselView
[!NOTE] Are you waiting for the changes in this PR to be merged? It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Details
When ItemsUpdatingScrollMode is set to KeepScrollOffset, the CurrentItem position gets reset incorrectly.
Root Cause
The CurrentItem position is incorrectly updated by the scrolled event when the scroll mode is set to KeepScrollOffset.
Description of Change
Explicitly set the current item index when the scroll mode is KeepScrollOffset to maintain the correct position and item selection.
Validated the behavior in the following platforms
- [x] Android
- [x] Windows
- [x] iOS
- [x] Mac
Issues Fixed
Fixes #29421
Output ScreenShot
| Before | After |
|---|---|
Hey there @@Shalini-Ashokan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.
/azp run MAUI-UITests-public
Azure Pipelines successfully started running 1 pipeline(s).
/rebase