-
-
Notifications
You must be signed in to change notification settings - Fork 241
[iOS only] Child Layouts of items in ListView are displayed on top of each other when height vary #1626
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 @mmeven, I noticed that you are using FlexBox properties(
Regarding the issue, I tested the the project and was able to recreate an issue with the dynamic sizing of the items. I will mark this as a bug. As a workaround you can replace also the main StackLayout container with
|
Thanks for your answer. Sorry for the inconvenience about the wrong properties, I must have left them while trying to replace the child layouts with Flexboxs. Thanks for the workaround. I did try to change the main layout to a Flexbox, however it doesn't seem to fix the issue at all, I get the same result. Did it work for you ? |
Hi @mmeven, Meanwhile, you can try to clear up the project following the below-attached steps and check if the problem persists after the rebuild.
|
Even after cleaning up the project is still observe the issue. By the way, I have added I am testing on a physical iPhone 6, with iOS version 12.1 (16B92) |
Have you found any temporary workaround to this issue meanwhile? |
Hi @AlessandroFBK , |
I found an issue on the Nativescript repository (NativeScript/NativeScript#6628) concerning this problem, with a workaround. If you add The issue is also discussed here #1599 . |
Hi @tsonevn , the issue is still here on my side using |
From @mmeven on November 21, 2018 15:18
Environment
Describe the bug
The issue is caused when a child layout of an ng-template can have a different height depending of the item displayed. It results in layouts being displayed on top of each other for items not at the top of the list (not displayed before scrolling), even though the parent layout has set its size to be able to contain every child layout.
To Reproduce
Create a component containing a ListView. The template for the items must be made of a parent Layout, and several child Layouts (at least 2) with one having a varying height, with a Label that is not displayed every time for exemple.
Expected behavior

The child Layouts should be displayed like this :
What happens

But this is what happens :
Sample project
https://github.com/mmeven/nativescript-listview-issue
Additional context
I did not manage to reproduce this issue with versions before 5.0.0, with tns-core-modules 4.2.1 and tns-ios 4.2.0 it works just fine. The "expected behavior" screenshot was done using those previous versions.
Copied from original issue: NativeScript/NativeScript#6594
The text was updated successfully, but these errors were encountered: