mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-23 10:32:17 -08:00
fix(editor): Show the correct actions count in the nodes list (#6183)
Fixes N8N-6402
This commit is contained in:
parent
5abdba2304
commit
751e132968
|
@ -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() {
|
||||
|
@ -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"
|
||||
|
@ -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 -->
|
||||
|
|
Loading…
Reference in a new issue