Knockout-Validation icon indicating copy to clipboard operation
Knockout-Validation copied to clipboard

Element is not decorated on dynamic observables

Open jd78 opened this issue 9 years ago • 3 comments

Please refers to http://jsbin.com/mudeko/4/edit?html,js,output for a live demo

Steps to recreate:

  • Click on Add Activity Type
  • Click on Save

the form is invalid but the element is not decorated.

However, this is working on the initial binding:

  • Reload the page
  • Click on Save

the form is invalid and the element is decorated.

Seems that the binding is detached on the following reassignments.

jd78 avatar Jun 01 '15 13:06 jd78

@jd78 There are some issues related to that and I'll get with an update on this once I find more time. Until then, a quick fix is to use the with binding.

http://jsbin.com/hiyirokeva/2/edit

crissdev avatar Jun 01 '15 15:06 crissdev

Thanks @crissdev, I can use the with binding for now.

jd78 avatar Jun 01 '15 15:06 jd78

Thanks. I encountered this issue today as well. http://jsfiddle.net/k0qyn8z2/ shows the problem as well as the successful "with" binding workaround mentioned above.

ma7r avatar Jun 12 '15 08:06 ma7r