We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5317b3d commit a72743aCopy full SHA for a72743a
1 file changed
Sources/ScrollViewProxy/ScrollViewProxy.swift
@@ -156,8 +156,10 @@ public struct ScrollViewReader<Content: View>: View {
156
// https://stackoverflow.com/a/61765994/3019595
157
}
158
.introspectScrollView {
159
- self.proxy.coordinator.scrollView = $0
160
- self.proxy.offset = $0.offsetPublisher
+ if self.proxy.coordinator.scrollView != $0 {
+ self.proxy.coordinator.scrollView = $0
161
+ self.proxy.offset = $0.offsetPublisher
162
+ }
163
164
165
0 commit comments