dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.26k stars 1.76k forks source link

Fixed [iOS] Fix CarouselViewRemoveAt so that it's passing on both CV1 and CV2 sets of handlers #25919

Open NirmalKumarYuvaraj opened 3 days ago

NirmalKumarYuvaraj commented 3 days ago

Issue Details

When using CV1 handlers, removing the first item from the CarouselView during navigation doesn't work as expected. The removed item remains visible in the view until we manually scroll it. This functionality works correctly with CV2 handlers.

Root Cause

When the CarouselView is detached and then reattached to the window, it doesn't undergo the proper initialization process again. This happens because the InitialPositionSet flag remains true from its previous attachment.

Description of Change

Setting the InitialPositionSet flag to false during the detachment process resolves the issue.

Validated the behaviour in the following platforms

Issues Fixed

Fixes #25776

Output

Before After
dotnet-policy-service[bot] commented 3 days ago

Hey there @NirmalKumarYuvaraj! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

jsuarezruiz commented 1 day ago

/azp run

azure-pipelines[bot] commented 1 day ago
Azure Pipelines successfully started running 3 pipeline(s).