Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollViewWithStickyHeader doesn't pass 'showsIndicators' to ScrollViewWithOffsetTracking #13

Closed
im-murilo opened this issue Mar 18, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@im-murilo
Copy link
Contributor

When setting a ScrollViewWithStickyHeader's 'showsIndicators' to 'false', this value is not passed on to ScrollViewWithOffsetTracking, so it always defaults to showing indicators.

Current version:
var scrollView: some View { GeometryReader { proxy in ScrollViewWithOffsetTracking(onScroll: handleScrollOffset) { VStack(spacing: 0) { scrollHeader content() .frame(maxHeight: .infinity) } } .onAppear { DispatchQueue.main.async { navigationBarHeight = proxy.safeAreaInsets.top } } } }

Should be:
var scrollView: some View { GeometryReader { proxy in ScrollViewWithOffsetTracking(onScroll: handleScrollOffset, showsIndicators: showsIndicators) { VStack(spacing: 0) { scrollHeader content() .frame(maxHeight: .infinity) } } .onAppear { DispatchQueue.main.async { navigationBarHeight = proxy.safeAreaInsets.top } } } }

@danielsaidi danielsaidi added the bug Something isn't working label May 30, 2024
@danielsaidi
Copy link
Owner

Thanks to you, now they do! 🙌

This is out in the just released 0.5.1.

@danielsaidi danielsaidi added this to the 0.5.1 milestone May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants