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>
|
<template>
|
||||||
<span class="row" v-for="(row, index) in rows" :key="index">
|
<span class="row" v-for="(row, index) in rows" :key="index">
|
||||||
|
<template v-if="index !== 'side'">
|
||||||
<tree-node
|
<tree-node
|
||||||
v-for="(node, nodeIndex) in row"
|
v-for="(node, nodeIndex) in row"
|
||||||
:key="nodeIndex"
|
:key="nodeIndex"
|
||||||
|
@ -7,6 +8,7 @@
|
||||||
@show-modal="openModal"
|
@show-modal="openModal"
|
||||||
:append="append"
|
:append="append"
|
||||||
/>
|
/>
|
||||||
|
</template>
|
||||||
</span>
|
</span>
|
||||||
<span class="side-nodes" v-if="rows.side">
|
<span class="side-nodes" v-if="rows.side">
|
||||||
<tree-node
|
<tree-node
|
||||||
|
@ -65,7 +67,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
if (layers[curr].position != undefined) {
|
if (layers[curr].position != undefined) {
|
||||||
acc[layers[curr].displayRow][layers[curr].position!] = curr;
|
acc[layers[curr].displayRow][layers[curr].position!] = curr;
|
||||||
} else {
|
} else if (layers[curr].displayRow) {
|
||||||
acc[layers[curr].displayRow].push(curr);
|
acc[layers[curr].displayRow].push(curr);
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
|
|
Loading…
Reference in a new issue