forked from verdnatura/salix-front
fix: zoneLocationsTree check selected sons
This commit is contained in:
parent
f3429297cf
commit
8e7cb9c46e
|
@ -75,6 +75,7 @@ const onNodeExpanded = async (nodeKeysArray) => {
|
|||
if (response.data) {
|
||||
node.childs = response.data.map((n) => {
|
||||
if (n.sons > 0) n.childs = [{}];
|
||||
n.selected = isSelected(n.selected);
|
||||
return n;
|
||||
});
|
||||
}
|
||||
|
@ -115,6 +116,10 @@ function getNodeIds(node) {
|
|||
return ids;
|
||||
}
|
||||
|
||||
function isSelected(selected) {
|
||||
if (typeof selected === 'number') return !!selected;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => store.data,
|
||||
async (val) => {
|
||||
|
|
Loading…
Reference in New Issue