BACK
ReferencewindowToggle
Reference · 119

windowToggle

windowToggle

rxjs.dev

Opens and closes Observable windows on signals.

Signature

windowToggle(openings: ObservableInput, closingSelector: (openValue: O) => ObservableInput): OperatorFunction>

What it does

openings opens windows; closingSelector closes a specific one. Unlike bufferToggle, the result is a stream of windows, not arrays.

When to use

Drag sessions, recording actions between start/stop, live-processing values inside an active window.

See also

bufferToggle, window

script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...