0
0
Fork 0

fix: zoneLocationsTree check selected sons

This commit is contained in:
Alex Moreno 2024-11-25 12:54:15 +01:00
parent f3429297cf
commit 8e7cb9c46e
1 changed files with 5 additions and 0 deletions

View File

@ -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) => {