Skip to content

Commit

Permalink
fix(editor): Show the correct actions count in the nodes list (#6183)
Browse files Browse the repository at this point in the history
Fixes N8N-6402
  • Loading branch information
netroy committed May 15, 2023
1 parent b8a4512 commit 1403333
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const { registerKeyHook } = useKeyboardNavigation();
const { workflowId } = useWorkflowsStore();
const activeItemId = computed(() => useKeyboardNavigation()?.activeItemId);
const actionCount = computed(() => props.elements.filter(({ type }) => type === 'action').length);
const expanded = ref(props.expanded ?? false);
function toggleExpanded() {
Expand Down Expand Up @@ -94,7 +95,7 @@ registerKeyHook(`CategoryLeft_${props.category}`, {
:name="category"
:disabled="disabled"
:active="activeItemId === category"
:count="elements.length"
:count="actionCount"
:expanded="expanded"
:isTrigger="isTriggerCategory"
data-keyboard-nav-type="category"
Expand All @@ -110,7 +111,7 @@ registerKeyHook(`CategoryLeft_${props.category}`, {
</n8n-tooltip>
</span>
</CategoryItem>
<div :class="$style.contentSlot" v-if="expanded && elements.length > 0 && $slots.default">
<div :class="$style.contentSlot" v-if="expanded && actionCount > 0 && $slots.default">
<slot />
</div>
<!-- Pass through listeners & empty slot to ItemsRenderer -->
Expand Down

0 comments on commit 1403333

Please sign in to comment.