View Full Version : [FIXED] Binding: setting bound objects = null, bindings to obj props not (always) cleared

12 May 2014, 4:13 PM
Ext version tested:

Browser versions tested against:

Chrome 34

When binding to properties of an object stored on the viewModel, nulling out the entire object doesn't (always) clear out components bound to that object's child properties. Similarly, setting the same data binding to an object lacking the same property on the original object fails to clear components bound to that now-missing property.

However, if the same properties have been nulled/set via a "path" syntax at some point, nulling the entire object does clear out all bound components as expected.

Steps to reproduce the problem:

See fiddle @ https://fiddle.sencha.com/#fiddle/5ph

Click button (e) or (f) - fields do not clear - this is the problem
Click button (a) - model data set via "object" syntax
Click button (e) or (f) - fields still not clearing
Click either button (b) or (d) to set/null the model data via "path syntax"
Click button (e) or (f) - fields will now clear as expected
Any future combination of button presses works as expected
Also, note that typing in the text field at any point will cause buttons (e) or (f) to work as expected from that point forward.

The result that was expected:

Buttons (e) and (f) should work from the start
Binding behavior should not change depending on history/syntax of setter calls

12 May 2014, 4:32 PM
The odd thing is that we have a couple of passing specs that are supposed to cover this. I guess there's some particular condition that's being missed here.

Will check it out, thanks.

12 May 2014, 4:39 PM
Thanks for checking it out and the quick reply!