Results 1 to 3 of 3

Thread: Binding cleanup fails with null values

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-27401 in 6.7.0.
  1. #1
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default Binding cleanup fails with null values

    Affects Ext 6.6 and probably earlier versions.

    Test case: https://fiddle.sencha.com/#view/editor&fiddle/2jbm
    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.

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

    Default

    Since this hasn't been getting much attention, fix below:

    Code:
    const fn = function() {
        var me = this,
            bindings, key, binding;
    
        if (me.$hasBinds) {
            bindings = me.getBind();
            if (bindings && typeof bindings !== 'string') {
                for (key in bindings) {
                    binding = bindings[key];
                    if (binding) {
                        binding.destroy();
                        binding._config = binding.getTemplateScope = null;
                    }
                }
            }
        }
        me.setBind(null);
    };
    
    // Classic Only
    Ext.define(null, {
        override: 'Ext.Component',
    
        privates: {
            removeBindings: fn
        }
    });
    
    // Needed for both toolkits
    Ext.define(null, {
        override: 'Ext.Widget',
    
        privates: {
            removeBindings: fn
        }
    });
    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
    Sencha - Support Team
    Join Date
    Mar 2015
    Location
    Chicago
    Posts
    239

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Similar Threads

  1. View Model Binding Fails to Execute
    By Trevor4001 in forum Ext JS 6.x Bugs
    Replies: 1
    Last Post: 9 Nov 2017, 5:57 AM
  2. Replies: 0
    Last Post: 12 Jun 2011, 1:50 AM
  3. Replies: 3
    Last Post: 19 May 2011, 8:30 AM
  4. ComboBox.getValue return null after binding???
    By lichnost in forum Ext GWT: Help & Discussion (1.x)
    Replies: 13
    Last Post: 7 Jun 2009, 11:05 AM

Posting Permissions

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