File tree Expand file tree Collapse file tree
src/reactive-sdk/Reactive.Components/Components/ScrollArea Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ public ScrollOrientation ScrollOrientation {
6464
6565 #region Setup
6666
67+ private float _prevContentSize ;
6768 private float _lastScrollDeltaTime ;
6869
6970 protected override void OnUpdate ( ) {
@@ -73,6 +74,15 @@ protected override void OnUpdate() {
7374 _lastScrollDeltaTime = - 1f ;
7475 }
7576
77+ if ( _contentTransform != null ) {
78+ var contentSize = Translate ( _contentTransform . rect ) ;
79+
80+ if ( _prevContentSize != contentSize ) {
81+ RefreshMeasurements ( ) ;
82+ _prevContentSize = contentSize ;
83+ }
84+ }
85+
7686 UpdateContentPos ( false ) ;
7787 }
7888
@@ -131,7 +141,7 @@ private void UpdateContentPos(bool immediately) {
131141 }
132142
133143 var translatedDestinationPos = Translate ( destinationPos ) ;
134-
144+
135145 // Returning if equal
136146 if ( sourcePos == destinationPos ) {
137147 _posSet = true ;
You can’t perform that action at this time.
0 commit comments