<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
| Prop | Type | Default | Description |
|---|---|---|---|
type | "scene" | "module" | "scene" | Whether to show events for the current scene or module |
Slots
| Slot | Scope | Description |
|---|---|---|
#content | event (Event object) | Renders each event item. Required — without this slot, the empty slot is shown instead. |
#empty | — | Shown 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
#contentslot is not provided, the widget displays the#emptyslot (or a default fallback message). - Events are filtered to remove any deleted entries, preventing render errors.
