Browse Source

Pull request #2466: 无JIRA任务 treevaluechooer设置value和open后勾选子节点父节点不更新状态

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit '6cb52eabc8115fa92fbe675738d89a8f59de351c':
  type写错了
  无JIRA任务 treevaluechooer设置value和open后勾选子节点父节点不更新状态
es6
windy 3 years ago
parent
commit
fa6bf6daed
  1. 7
      src/component/treevaluechooser/abstract.treevaluechooser.js
  2. 2
      src/component/treevaluechooser/combo.treevaluechooser.js

7
src/component/treevaluechooser/abstract.treevaluechooser.js

@ -556,6 +556,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
BI.each(nodes, function (idx, node) {
allNodes = BI.concat(allNodes, self._getAllChildren(parentValues.concat([node.value])));
});
var lastFind;
BI.each(allNodes, function (idx, node) {
var valueMap = dealWithSelectedValue(node.parentValues, selectedValues);
// REPORT-24409 fix: 设置节点全部展开,添加的节点没有给状态
@ -566,7 +567,13 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
if (find) {
parentCheckState.checked = find.halfCheck ? false : find.checked;
parentCheckState.half = find.halfCheck;
// 默认展开也需要重置父节点的halfCheck
if (BI.isNotNull(lastFind) && (lastFind !== find || allNodes.length - 1 === idx)) {
lastFind.half = lastFind.halfCheck;
lastFind.halfCheck = false;
}
}
lastFind = find;
var state = getCheckState(node.value, node.parentValues, valueMap, parentCheckState);
result.push({
id: node.id,

2
src/component/treevaluechooser/combo.treevaluechooser.js

@ -25,7 +25,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
this._initData(o.items);
}
this.combo = BI.createWidget({
type: "bi.multi_tree_list_combo",
type: "bi.multi_tree_combo",
simple: o.simple,
text: o.text,
allowEdit: o.allowEdit,

Loading…
Cancel
Save