Typed Event Subscription (on / off / once)
A public event API with strongly typed event names and payloads. Consumers can subscribe, unsubscribe and listen a single time. Events let applications react to grid changes without polling state.
Planned. This page shows the specification from issue #206. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
One grid is shown next to a live event log panel. The log is subscribed to selectionChanged, sortChanged and filterChanged.
Expected behavior
Interacting with the grid appends typed entries to the log for subscribed events only. Entries subscribed with once() appear one time and are then removed automatically.
Planned API surface
onoffonceGridEventMapselectionChangedsortChangedfilterChangeddataLoadedcellValueChangedAcceptance criteria
- on() returns a function that unsubscribes the handler when called (pending)
- off(name, handler) removes only that specific handler (pending)
- A once() handler fires exactly one time (pending)
- TypeScript reports an error for unknown event names and for mismatched payload property access (pending)
- Each payload includes the source gridId and a timestamp (pending)