-
-
Notifications
You must be signed in to change notification settings - Fork 241
ScrollView with GridLayout does not correctly update on IOS #1593
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
Comments
Hi @cremfert,
This issue seems to be related to the one logged here. |
@tsonevn works for me but hope there is a fix without this since is dirty fix :/ |
Thanks for your help, @tsonevn
regarding your code example. I will try that and will come back with feedback soon! Thank you! |
Yes, this did the trick - really thank you! |
Uh oh!
There was an error while loading. Please reload this page.
Environment
CLI: 5.0.0
Cross-platform modules: 5.0.1
Android Runtime: 5.0.0
iOS Runtime: 5.0.0
Plugin(s):
"nativescript-iqkeyboardmanager": latest
"nativescript-loading-indicator-new": "^2.1.0",
"nativescript-loading-screen": "^1.0.6",
"nativescript-material-icons": "^1.0.3",
"nativescript-ngx-fonticon": "^4.1.0",
"nativescript-plugin-firebase": "^7.2.0",
"nativescript-sqlite": "^2.2.3",
"nativescript-sse": "^4.0.2"
NativeScript-Angular: 6.2.0
Angular: 6.1.0
Describe the bug
I have a layout that consists of a ScrollView with embedded StackLayout and GridLayout. The GridLayout is repeated with ngFor:
This works fine on first rendering, but as soon as I add new items to the array (messages), I notice an UI bug: An empty element is added at the bottom (I can see it due to the space that it covers) and the text of the message appears at the very beginning of the scrollview. I didn't find any other option than scrolling to the top of the scrollView, add the item and then scroll back to the bottom. Only in this case, the new item is correctly placed at the end of the scrollview. But this is annoying as you can see the "jump" (due to the fact that I even need a small delay of around 100 ms with setTimeout):
Is there any chance to force re-rendering of ScrollView without scrolling to top/bottom?
To Reproduce
See above.
Expected behavior
The item should be added and ScrollView should be updates correctly with the new item at the end.
Sample project
Additional context
Only happens on iOS. I have to use this construction of layouts as using a ListView causes other issues with the keyboard hiding content on iOS.
The text was updated successfully, but these errors were encountered: