Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Nov 2014
    Posts
    5
    Vote Rating
    0
    g.toto is on a distinguished road

      0  

    Default The TPL COMPONENT not updated when the value of the record is set to null.

    Class Component.js
    This method is call a example when obj.setRecord(null);
    Code:
    updateRecord: function(newRecord, oldRecord) {
        var me = this;
    
        if (oldRecord) {
            oldRecord.unjoin(me);
        }
    
        if (!newRecord) {
            me.updateData('');     <--- CALL THIS INSTRUCTION 
        }
        else {
            newRecord.join(me);
            me.updateData(newRecord.getData(true));
        }
    }
    
    
    
    //NEXT CALL with  newData=''
    
    
    /**
     * @private
    */
    updateData: function(newData) {
        var me = this;
        if (newData) { //with newData equal to '' do not will enter into this if
            var tpl = me.getTpl(),
                tplWriteMode = me.getTplWriteMode();
    
            if (tpl) {
                tpl[tplWriteMode](me.getInnerHtmlElement(), newData);
            }
    
            /**
             * @event updatedata
             * Fires whenever the data of the component is updated
             * @param {Ext.Component} this The component instance
             * @param {Object} newData The new data
             */
            this.fireEvent('updatedata', me, newData);
        }
    },

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    9,306
    Vote Rating
    253
    Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of

      0  

    Default

    Thanks for the report. Can you please post a test case which reproduces the behavior you're seeing?
    https://fiddle.sencha.com/#home


    Join me at SenchaCon 2016!

Thread Participants: 1

Tags for this Thread