当用户检查/取消选中树节点时,它会丢失它的背景色。 它现在仍然被选中。但用户无法看到它。我们怎样才能带回选定的背景色?
答案 0 :(得分:0)
这实际上是Ext 4.1.1中的一个错误 - 据说它已在4.1.2中修复但尚未公开。
对于临时修复,我将view / Table.js中的第724-735行更改为以下内容:
if (oldRowDom.mergeAttributes) {
var tmpCls = oldRowDom.className;
oldRowDom.mergeAttributes(newRow, true);
} else {
var tmpCls = oldRowDom.getAttribute('class');
newAttrs = newRow.attributes;
attLen = newAttrs.length;
for (i = 0; i < attLen; i++) {
attName = newAttrs[i].name;
if (attName !== 'id') {
oldRowDom.setAttribute(attName, newAttrs[i].value);
}
}
}
if(tmpCls){
oldRow.addCls(tmpCls);
}