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