Extjs4.x TreeGrid Dirty 更新数据,dirty标记不会自动清除的bug

如上图所示,当修改某个属性值,成功提交后,dirty的小三角不会自动清除,这个是官方treegrid的一个bug,目前尚未解决。

bug:http://www.sencha.com/forum/showthread.php?141144-4.0.2a-TreeStore-doesn-t-clear-dirty-flag-on-updated-record 

目前的解决办法:

在TreeStore的最末端,添加如下代码:
onUpdateRecords: function (records, operation, success) {
        records = operation.records;
        if (success) {
            Ext.each(records, function (record) {
                record.commit();
            });
        }
        this.callParent(arguments);
}
原文地址:https://www.cnblogs.com/qidian10/p/3252939.html