From e02a3ca950e8cdda16c8c961ee803ebf2c4b5a9a Mon Sep 17 00:00:00 2001 From: MrRefactor Date: Mon, 6 Apr 2026 20:55:31 +0200 Subject: [PATCH] fix(ios): respect scrollEnabled false --- ios/PagerView.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ios/PagerView.swift b/ios/PagerView.swift index 4b866290..be73f2ff 100644 --- a/ios/PagerView.swift +++ b/ios/PagerView.swift @@ -38,6 +38,14 @@ struct PagerView: View { collectionView.delegate = scrollDelegate } } + .onAppear { + // Apply initial prop values that .onChange won't catch + // (.onChange only fires on changes, not on initial values) + DispatchQueue.main.async { + collectionView?.isScrollEnabled = props.scrollEnabled + collectionView?.bounces = props.overdrag + } + } .onChange(of: props.children) { newValue in if props.currentPage >= newValue.count && !newValue.isEmpty { props.currentPage = newValue.count - 1