|
|
|
@ -963,13 +963,7 @@ export class AbstractTreeValueChooser extends Widget {
|
|
|
|
|
buildCompleteTree(selectedValues) { |
|
|
|
|
const result = {}; |
|
|
|
|
|
|
|
|
|
if (selectedValues !== null && !isEmpty(selectedValues)) { |
|
|
|
|
fill([], this.tree.getRoot(), selectedValues, result); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
|
|
function fill(parentValues, node, selected, r) { |
|
|
|
|
const fill = (parentValues, node, selected, r) => { |
|
|
|
|
if (selected === null || isEmpty(selected)) { |
|
|
|
|
each(node.getChildren(), (i, child) => { |
|
|
|
|
const newParents = clone(parentValues); |
|
|
|
@ -988,5 +982,11 @@ export class AbstractTreeValueChooser extends Widget {
|
|
|
|
|
fill(newParents, node, selected[k], r[k]); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (selectedValues !== null && !isEmpty(selectedValues)) { |
|
|
|
|
fill([], this.tree.getRoot(), selectedValues, result); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|