Skip to content

Nativescript Typescript-Angular ListView can't not render item with ngIf #1336

Open
@tsonevn

Description

@tsonevn

From @LeCaoPhuc on May 19, 2018 9:27

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?

Yes

Tell us about the problem

Hello . Sorry if my english so bad.
I see some issue for this problem but solution is not work or not good.
ListView iOS do not render item in TypeScript - angular if use ngIf or visibility.

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.0.1
  • Cross-platform modules: "4.0.1"
  • Runtime(s): 4.0.1"

Please tell us how to recreate the issue in as much detail as possible.

ListView iOS do not rendering in TypeScript - angular if use ngIf unless scroll to up until it lost and scroll down again.
I try to use property "visibility" but it have another problem. If you set default is "visible" it will work good, but if default is a "collapse" , it will likely ngIf and can't work.

If use get element with getChildAt() and set "visibility" again it don't work.
Have solution is use refresh() but it poor UX because If list have a textfield like my app TextField will lost focus and many problem as it will scrollToIndex if item is a big layout.

link playground recreate problem : https://play.nativescript.org/?template=play-ng&id=h72kgd&v=2
In project i try visibility but it was comment in .html file.

Thanks.

Copied from original issue: NativeScript/NativeScript#5840

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions