The Wayback Machine - https://web.archive.org/web/20250430094716/https://github.com/NativeScript/NativeScript/issues/7362
Skip to content

The binding will not be updated when we have nested objects #7362

Open
@tsonevn

Description

@tsonevn

Environment

  • CLI: 5.4
  • Cross-platform modules: 5.4
  • Android Runtime: 5.4
  • iOS Runtime: 5.4

Describe the bug
The value of the property will not be updated correctly when we used nested objects

To Reproduce

  1. click on Change Fields Values button
  2. update the value on one of the fields in the app
  3. click Check value

Expected behaviour
The updated value to be printed in the code-behind.

Sample project
https://play.nativescript.org/?template=play-tsc&id=iBfC3Z&v=2

Workaround
Set up bindnigContext to the parent container

<StackLayout row="1" colSpan="2" bindingContext="{{testObj}}" orientation="horizontal">
            <TextField  text="{{ thing1, thing1 }}" hint="Enter text..." />
            <TextField text="{{ thing2, thing2 }}" hint="Enter text..." />
 </StackLayout>

https://play.nativescript.org/?template=play-tsc&id=iBfC3Z&v=3


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

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