Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: EventStream

@react-form-builder/core.EventStream

The event stream of the form viewer.

Constructors

constructor

new EventStream(stream)

Creates the event stream of the form viewer.

Parameters

NameTypeDescription
streamObservable<ActionEventArgs>the set of observable events.

Methods

filter

filter(predicate): EventStream

Returns the event stream filtered by the specified predicate function.

Parameters

NameTypeDescription
predicate(args: ActionEventArgs) => booleanthe predicate function.

Returns

EventStream

the event stream filtered by the specified predicate function.


keys

keys(...keys): EventStream

Returns the event stream filtered by the specified sender keys.

Parameters

NameTypeDescription
...keysstring[]the sender key array.

Returns

EventStream

the event stream filtered by the specified sender keys.


listen

listen(next): () => void

Adds the subscriber to the stream of observed events.

Parameters

NameTypeDescription
next(value: ActionEventArgs) => voidthe subscriber function.

Returns

fn

▸ (): void

Adds the subscriber to the stream of observed events.

Returns

void

listen(observer): () => void

Adds the specified observer to the stream of observed events.

Parameters

NameTypeDescription
observerPartial<Observer<ActionEventArgs>>the observer.

Returns

fn

▸ (): void

Adds the specified observer to the stream of observed events.

Returns

void


types

types(...types): EventStream

Returns the event stream filtered by the specified event types.

Parameters

NameTypeDescription
...typesstring[]the array of event types.

Returns

EventStream

the event stream filtered by the specified event types.