From 99cbadb35adafb7d5bf4b9f507225d4257d41286 Mon Sep 17 00:00:00 2001 From: Alpha Date: Mon, 4 May 2026 17:25:42 -0400 Subject: [PATCH] fix(ios): persist position during page list head changes Fixes #965 --- ios/PagerViewProvider.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ios/PagerViewProvider.swift b/ios/PagerViewProvider.swift index 54fb5177..7e0f8ecd 100644 --- a/ios/PagerViewProvider.swift +++ b/ios/PagerViewProvider.swift @@ -74,6 +74,9 @@ import UIKit return } props.children.insert(IdentifiablePlatformView(child), at: index) + if index <= props.currentPage { + props.currentPage += 1 + } } @objc(removeChildAtIndex:) @@ -82,6 +85,9 @@ import UIKit return } props.children.remove(at: index) + if index < props.currentPage { + props.currentPage -= 1 + } } override public func didMoveToWindow() {