Skip to content

<EventsWidget>

INFO

The <EventsWidget> component must be used inside a <DesignerRoot> component.

<EventsWidget> displays the event list for the currently selected scene or module. It reads the event IDs from state.currentScene or state.currentModule based on the type prop.

Props

PropTypeDefaultDescription
type"scene" | "module""scene"Whether to show events for the current scene or module

Slots

SlotScopeDescription
#contentevent (Event object)Renders each event item. Required — without this slot, the empty slot is shown instead.
#emptyShown when #content is not provided. Falls back to a default message if not set.

Usage Example

Basic Version

vue
<template>
    <EventsWidget type="module">
        <template #content="event">
            <span>{{ event.type }}</span>
        </template>
    </EventsWidget>
</template>

With Custom Empty State

vue
<template>
    <EventsWidget type="module">
        <template #content="event">
            <div class="event-item">
                <span>{{ event.title }}</span>
                <button>Configure</button>
            </div>
        </template>
        <template #empty>
            <p>No events defined for this module.</p>
        </template>
    </EventsWidget>
</template>

Notes

  • If the #content slot is not provided, the widget displays the #empty slot (or a default fallback message).
  • Events are filtered to remove any deleted entries, preventing render errors.