filter-events
Applies a predicate that filters events out of every view, or clears it. Filters can be stacked under different tag keys; passing the same tag replaces the previous predicate, and omitting filter clears the entry for that tag.
Usage
type FilterEventsPayload = {
filter?: ((event: any) => boolean) | null;
tag?: string;
};
| Field | Type | Description |
|---|---|---|
filter | ((event: any) => boolean) | null | Predicate that returns true to keep the event. null or omitted clears the entry. |
tag | string | Identifier used to stack filters. Same tag overwrites the previous predicate. |
Trigger
api.exec("filter-events", {
tag: "calendars",
filter: e => activeIds.includes(e.calendarId),
});
Clear a single tag:
api.exec("filter-events", { tag: "calendars" });
Observe
api.on("filter-events", p => console.log("filter:", p.tag, p.filter));
Intercept
api.intercept("filter-events", p => p.tag !== "system");
Component handler
<Calendar :onfilterevents="p => console.log('filter:', p.tag, p.filter)" />
Related articles
CalendarPanel— sidebar component that auto-dispatches this action.exec— programmatic dispatcher.- Filtering — full guide on stacking filters and predicate patterns.
- Calendar groups — checkbox-driven group filters.