SingleSelectionStore

open class SingleSelectionStore : RootStore<Int?>

This store can be used for components with an internal store that has to deal with a single element selection from a collection of predefined values (like for a selectField or radioGroup component)

It is based upon the index of an item from the list represented by the Int type.

RFC: Never ever expose the internal store directly to the client side! Only accept values or Flows and return those in order to exchange data with the client!

Constructors

Link copied to clipboard
fun SingleSelectionStore()

Functions

Link copied to clipboard
open suspend override fun enqueue(update: QueuedUpdate<Int?>)
Link copied to clipboard
open fun errorHandler(exception: Throwable, oldValue: Int?): Int?
Link copied to clipboard
open fun handle(errorHandler: ErrorHandler<Int?>, execute: suspend (Int?) -> Int?): SimpleHandler<Unit>
open fun <A> handle(errorHandler: ErrorHandler<Int?>, execute: suspend (Int?, A) -> Int?): SimpleHandler<A>
Link copied to clipboard
open fun <E> handleAndEmit(errorHandler: ErrorHandler<Int?>, execute: suspend FlowCollector<E>.(Int?) -> Int?): EmittingHandler<Unit, E>
open fun <A, E> handleAndEmit(errorHandler: ErrorHandler<Int?>, execute: suspend FlowCollector<E>.(Int?, A) -> Int?): EmittingHandler<A, E>
Link copied to clipboard
open infix fun <E : Event, X : Element> DomListener<E, X>.handledBy(handler: Handler<Unit>)
open infix fun <E : Event, X : Element> DomListener<E, X>.handledBy(execute: suspend (E) -> Unit): Job
open infix fun <E : Event> WindowListener<E>.handledBy(handler: Handler<Unit>)
open infix fun <E : Event> WindowListener<E>.handledBy(execute: suspend (E) -> Unit): Job
open infix fun <A> Flow<A>.handledBy(handler: Handler<A>)
open infix fun <A> Flow<A>.handledBy(execute: suspend (A) -> Unit): Job
Link copied to clipboard
open fun <X> sub(lens: Lens<Int?, X>): SubStore<Int?, X>
Link copied to clipboard
open fun syncBy(handler: Handler<Int?>)
open fun syncBy(handler: Handler<Unit>)
Link copied to clipboard
open fun <I> syncWith(socket: Socket, resource: Resource<Int?, I>)

Properties

Link copied to clipboard
open override val current: Int?
Link copied to clipboard
open override val data: Flow<Int?>
Link copied to clipboard
open override val id: String
Link copied to clipboard
open override val job: Job
Link copied to clipboard
open override val path: String
Link copied to clipboard
val toggle: EmittingHandler<Int, Int>
Link copied to clipboard
open override val update: SimpleHandler<Int?>