Fix: Perform view updates during scroll tracking #679
Merged
+5
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for providing this great package, @scenee. We have been using it in our app for years now, since it is the best solution for panels below the tab bar.
We used to use the SwiftUI implementation from some issue thread, IIRC, but are currently switching to version 3.2.0 with official SwiftUI support. Thereby noticing this issue reappear:
When we enable
floatingPanelScrollTrackingon our view inside of the floating panel, some view updates are performed (i.e., SwiftUI views are being instantiated) but no rendering (i.e.,bodyevaluations) occurs.Example code:
content .floatingPanel( coordinator: ContentPanelCoordinator.self, onEvent: onEvent ) { proxy in panelContent .floatingPanelScrollTracking(proxy: proxy) // scroll tracking breaks view updates }We tracked this down to the scroll tracking, and it seems that the performing of view updates inside of the
ScrollViewRepresentablewas missing.This seems similar to #675.