DataLoader

class DataLoader<T>(component: Component<*>, val options: DataLoader.Options<T>)

Constructors

Link copied to clipboard
constructor(component: Component<*>, options: DataLoader.Options<T>)

Types

Link copied to clipboard
data class Options<T>(val load: suspend () -> Flow<T>)
Link copied to clipboard
class Render<T>
Link copied to clipboard
sealed class State<T>

Functions

Link copied to clipboard
operator fun invoke(flow: FlowContent, block: DataLoader.Render<T>.() -> Unit)
Link copied to clipboard
fun modifyValue(block: (T) -> T)
Link copied to clipboard
fun reload(debounceMs: Long = 200)
Link copied to clipboard
fun reloadSilently(debounceMs: Long = 200)
Link copied to clipboard
fun setLoaded(data: T)
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard

The current state of the loader

Link copied to clipboard
val value: Stream<T?>

The current value of the loader