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.

    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
    5,352
    Vote Rating
    113
    Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice

      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
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our human resources manager: fabienne.bell@sencha.com

Thread Participants: 1

Tags for this Thread