Skip to content

Type Alias: RCustomFieldBusEventMap

ts
type RCustomFieldBusEventMap = EventMap<{
  blur: [];
  focus: [];
  intersecting: [IntersectionObserverEntry[]];
}>;

Event map type for the RCustomField event bus system.

Defines the typed events that can be emitted and listened to via the event bus provided to custom field implementations. This enables sophisticated communication between the wrapper and custom components.

Events:

  • intersecting: Fired when viewport intersection changes (for autofocus/lazy loading)
  • focus: Fired when the wrapper detects focus should be triggered

Example

typescript
// In custom field implementation
setup({ bus }) {
  bus.on('focus', () => {
    // Handle focus from wrapper
  })
  bus.on('intersecting', (entries) => {
    // Handle viewport intersection
  })
}