Open wschroers opened 4 years ago
@jiswo In the meantime, the visibility
property might help.
https://docs.nativescript.org/api-reference/modules/_ui_enums_.visibility
@csimpi, thanks for the suggestion, will give that a try.
The bug mentioned appears to be related to form validation and the use of ngIf on the StackLayout containing the form elements. The error message indicates that the item2 variable is undefined when trying to access its valid property. One possible solution to this issue is to use ngIf directly on the individual form elements inside the StackLayout, rather than using it on the entire StackLayout. This way, the form elements are only created when they need to be visible, and the references to item2 will not be accessed when it's not present.``
Environment Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project): √ Getting NativeScript components versions information... √ Component nativescript has 6.5.0 version and is up to date. √ Component tns-core-modules has 6.5.0 version and is up to date. √ Component tns-android has 6.5.0 version and is up to date. √ Component tns-ios has 6.5.0 version and is up to date.Describe the bug Form validation seem to be broken when form elements exist inside a StackLayout with ngIf defined on it. I'm using a form with multiple input fields but some of them should only be visible if a certain condition is met. The ngIf is causing an exception with the following message:
ERROR TypeError: undefined is not an object (evaluating '_co.item2.valid')
To Reproduce
Any help would be appreciated, thanks.