mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50: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 { workflowId } = useWorkflowsStore();
|
||||||
|
|
||||||
const activeItemId = computed(() => useKeyboardNavigation()?.activeItemId);
|
const activeItemId = computed(() => useKeyboardNavigation()?.activeItemId);
|
||||||
|
const actionCount = computed(() => props.elements.filter(({ type }) => type === 'action').length);
|
||||||
const expanded = ref(props.expanded ?? false);
|
const expanded = ref(props.expanded ?? false);
|
||||||
|
|
||||||
function toggleExpanded() {
|
function toggleExpanded() {
|
||||||
|
@ -94,7 +95,7 @@ registerKeyHook(`CategoryLeft_${props.category}`, {
|
||||||
:name="category"
|
:name="category"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:active="activeItemId === category"
|
:active="activeItemId === category"
|
||||||
:count="elements.length"
|
:count="actionCount"
|
||||||
:expanded="expanded"
|
:expanded="expanded"
|
||||||
:isTrigger="isTriggerCategory"
|
:isTrigger="isTriggerCategory"
|
||||||
data-keyboard-nav-type="category"
|
data-keyboard-nav-type="category"
|
||||||
|
@ -110,7 +111,7 @@ registerKeyHook(`CategoryLeft_${props.category}`, {
|
||||||
</n8n-tooltip>
|
</n8n-tooltip>
|
||||||
</span>
|
</span>
|
||||||
</CategoryItem>
|
</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 />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
<!-- Pass through listeners & empty slot to ItemsRenderer -->
|
<!-- Pass through listeners & empty slot to ItemsRenderer -->
|
||||||
|
|
Loading…
Reference in a new issue