Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <dev@florianhotze.com>
  • Loading branch information
florian-h05 committed Jan 13, 2025
1 parent b331344 commit a8d2be5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
:textColor="iconColor" :color="'blue'"
:selected="selected && selected === widget"
:opened="!widget.closed"
:toggle="canHaveChildren"
@treeview:open="setWidgetClosed(false)"
@treeview:close="setWidgetClosed(true)"
@click="select">
<draggable v-if="canHaveChildren" :list="children" group="sitemap-treeview" animation="150" fallbackOnBody="true" swapThreshold="0.6"
<draggable :list="children" group="sitemap-treeview" animation="150" fallbackOnBody="true" swapThreshold="0.6"
@start="onStart" @change="onChange" @end="onEnd">
<sitemap-treeview-item class="sitemap-treeview-item" v-for="(childwidget, idx) in children"
:key="idx"
Expand Down Expand Up @@ -126,7 +127,7 @@ export default {
return this.widget.slots?.widgets || []
},
canHaveChildren () {
return this.LINKABLE_WIDGET_TYPES.includes(this.widget.component) && (this.children.length > 0 || this.localMoveState.moving)
return (this.LINKABLE_WIDGET_TYPES.includes(this.widget.component) && (this.children.length > 0 || this.localMoveState.moving)) === true
}
}
}
Expand Down

0 comments on commit a8d2be5

Please sign in to comment.