question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ArrayWidget add item not working on models with 2 way binding

See original GitHub issue

If you bind your model object 2 way with the “banana in a box” operator [(model)] then pressing the button Add does not add a new item.

I debugged a little bit and noticed that the this.formProperty.addItem() does indeed create a new item and also it does add it to the formProperties.properties of the ArrayWidget.

But then somehow the formProperties.properties gets cleared and does not contain any items anymore.

This example at stackblitz will show how it does: https://stackblitz.com/edit/issue-ngx-schema-form-add-array-item?embed=1&file=src/app/app.component.html ngx-schema-form-2waybinding-array-add-item

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jmsegrevcommented, Aug 28, 2018

Im little short on time, but Ill try take a look at it, this week.

1reaction
ebrehaultcommented, Aug 27, 2018

@jmsegrev it seems it comes from your ControlValueAccessor implementation (https://github.com/makinacorpus/ngx-schema-form/commit/a652f458813cd0f119b2481924bfbbed2eda323c). Could you have a look to @daniele-pecora issue here? Thanks 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular - @Input: Two way data binding not working
For two -way-binding using the [(xxx)] (banana-in-a-box) syntax, you need an @Input() and an @Output() with matching names like: @Input() myProp:String ...
Read more >
Two-way binding - Angular
Sets a specific element property. Event binding, Listens for an element change event. Adding two-way data bindinglink. Angular's two-way binding syntax is ...
Read more >
Implement a custom cart summary widget - Oracle Help Center
After you add custom properties to the commerceItem item type, you need to provide a way for a shopper to specify the values...
Read more >
One-way and Two-way Data Binding in Angular | Pluralsight
One-way data binding will bind the data from the component to the view ... Property binding is used to set a property of...
Read more >
VERY LARGE TELESCOPE - FTP Directory Listing
2.7.2 Activate Run-Time DEBUG Flags . ... 4.3.11 Add Simple Graphic Element . ... Strategies to solve possible problems in 'performance'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found