SelectionMode

class SelectionMode<T>(val job: Job) : WithJob

This Property alike class exposes the selection configuration of a data collection. There are two modes available:

Of course both can be omitted if no selection is needed.

Constructors

Link copied to clipboard
constructor(job: Job)

Properties

Link copied to clipboard
Link copied to clipboard
open override val job: Job
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun errorHandler(cause: Throwable)
Link copied to clipboard
open infix fun <A> Flow<A>.handledBy(handler: Handler<A>)
open infix fun <A> Flow<A>.handledBy(execute: suspend (A) -> Unit): Job
open infix fun <E : Event> Flow<E>.handledBy(handler: Handler<Unit>)
open infix fun <E : Event> Flow<E>.handledBy(execute: suspend (E) -> Unit): Job
Link copied to clipboard
fun sanitizeSelection(availableItems: Flow<List<T>>, data: CollectionData<T>)

Calling this function will connect the provided Flow of List of T with the current selection flow (one single item T for mode single and some List of T for mode multi). On every change of the external items flow, the current selection will be sanitized in the following way: If the selection contains some item, that is not part of the items flow, it will be removed from the selection.

Link copied to clipboard
fun selectItem(itemToSelect: Flow<T>, data: CollectionData<T>)

This function connects some Flow of T with a defined selection, either for single or multi mode.

Link copied to clipboard
fun use(other: SelectionMode<T>)