RowSelectionStore

class RowSelectionStore<T, I>(rowIdProvider: (T) -> I) : RootStore<List<T>>

This store manages the selected rows of the data table. It does not manage the state of the columns (configuration meta data like sorting, order and so on); this is done by StateStore!

Constructors

RowSelectionStore
Link copied to clipboard
js
fun <T, I> RowSelectionStore(rowIdProvider: (T) -> I)

Functions

enqueue
Link copied to clipboard
js
open suspend override fun enqueue(update: QueuedUpdate<List<T>>)
errorHandler
Link copied to clipboard
js
open fun errorHandler(exception: Throwable, oldValue: List<T>): List<T>
handle
Link copied to clipboard
js
open fun handle(errorHandler: ErrorHandler<List<T>>, execute: suspend (List<T>) -> List<T>): SimpleHandler<Unit>
open fun <A> handle(errorHandler: ErrorHandler<List<T>>, execute: suspend (List<T>, A) -> List<T>): SimpleHandler<A>
handleAndEmit
Link copied to clipboard
js
open fun <E> handleAndEmit(errorHandler: ErrorHandler<List<T>>, execute: suspend FlowCollector<E>.(List<T>) -> List<T>): EmittingHandler<Unit, E>
open fun <A, E> handleAndEmit(errorHandler: ErrorHandler<List<T>>, execute: suspend FlowCollector<E>.(List<T>, A) -> List<T>): EmittingHandler<A, E>
handledBy
Link copied to clipboard
js
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
isDataRowSelected
Link copied to clipboard
js
fun isDataRowSelected(item: T): Flow<Boolean>
sub
Link copied to clipboard
js
open fun <X> sub(lens: Lens<List<T>, X>): SubStore<List<T>, X>
syncBy
Link copied to clipboard
js
open fun syncBy(handler: Handler<Unit>)
open fun syncBy(handler: Handler<List<T>>)
syncWith
Link copied to clipboard
js
open fun <I> syncWith(socket: Socket, resource: Resource<List<T>, I>)

Properties

current
Link copied to clipboard
js
open override val current: List<T>
data
Link copied to clipboard
js
open override val data: Flow<List<T>>
dbClickedRow
Link copied to clipboard
js
val dbClickedRow: EmittingHandler<T, T>
id
Link copied to clipboard
js
open override val id: String
job
Link copied to clipboard
js
open override val job: Job
path
Link copied to clipboard
js
open override val path: String
selectedData
Link copied to clipboard
js
val selectedData: Flow<List<T>>
The first item must always be dropped; need to find out why!
selectRow
Link copied to clipboard
js
val selectRow: SimpleHandler<T?>
selectRows
Link copied to clipboard
js
val selectRows: EmittingHandler<T, List<T>>
syncHandler
Link copied to clipboard
js
val syncHandler: SimpleHandler<List<T>>
This handler can be used to synchronize the selection with the actual data of the table.
update
Link copied to clipboard
js
open override val update: SimpleHandler<List<T>>
updateRow
Link copied to clipboard
js
val updateRow: SimpleHandler<T?>
This handler can be used to preselect one single row for the initial rendering of the table.