Fixed tree component showing nodes it shouldn't
This commit is contained in:
parent
a63a4084cb
commit
c1ab09f0fb
1 changed files with 10 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<span class="row" v-for="(row, index) in rows" :key="index">
|
||||
<template v-if="index !== 'side'">
|
||||
<tree-node
|
||||
v-for="(node, nodeIndex) in row"
|
||||
:key="nodeIndex"
|
||||
|
@ -7,6 +8,7 @@
|
|||
@show-modal="openModal"
|
||||
:append="append"
|
||||
/>
|
||||
</template>
|
||||
</span>
|
||||
<span class="side-nodes" v-if="rows.side">
|
||||
<tree-node
|
||||
|
@ -65,7 +67,7 @@ export default defineComponent({
|
|||
}
|
||||
if (layers[curr].position != undefined) {
|
||||
acc[layers[curr].displayRow][layers[curr].position!] = curr;
|
||||
} else {
|
||||
} else if (layers[curr].displayRow) {
|
||||
acc[layers[curr].displayRow].push(curr);
|
||||
}
|
||||
return acc;
|
||||
|
|
Loading…
Reference in a new issue