Results 1 to 3 of 3

Thread: Binding: setting bound objects = null, bindings to obj props not (always) cleared

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-13373 in 5.0.0b3.
  1. #1
    Ext JS Premium Member anselmtmcclain's Avatar
    Join Date
    Mar 2008
    Location
    Northern California
    Posts
    115

    Question Binding: setting bound objects = null, bindings to obj props not (always) cleared

    Ext version tested:
    • Ext 5.0.0.736
    Browser versions tested against:
    • Chrome 34
    Description:

    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

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,255

    Default

    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.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Ext JS Premium Member anselmtmcclain's Avatar
    Join Date
    Mar 2008
    Location
    Northern California
    Posts
    115

    Default

    Thanks for checking it out and the quick reply!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •