SplittableOptionSignal

final class SplittableOptionSignal[Input](val signal: Signal[Option[Input]]) extends AnyVal
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def splitOption[Output](project: (Input, Signal[Input]) => Output, ifEmpty: => Output): Signal[Output]

This .split-s a Signal of an Option by the Option's isDefined property. If you want a different key, use the .split operator directly.

This .split-s a Signal of an Option by the Option's isDefined property. If you want a different key, use the .split operator directly.

Value parameters:
ifEmpty
  • returned if Option is empty. Evaluated whenever the parent signal switches from Some(a) to None, or when the parent signal starts with a None. ifEmpty is NOT re-evaluated when the parent signal emits None if its value is already None.
project
  • (initialInput, signalOfInput) => output project is called whenever signal switches from None to Some(). signalOfInput starts with initialInput value, and updates when the parent signal updates from Some(a) to Some(b).

Concrete fields

val signal: Signal[Option[Input]]