Paging

private data class Paging<T>(val query: String? = null, val options: List<DropdownOption<T>> = emptyList(), val nextPage: Long = 0, val hasMore: Boolean = false)

Paging position for one search, replaced as a whole.

Keeping this as one object rather than four separate state variables is deliberate: loading the first page and loading further ones are two independent effects, and with separate variables the second could start with a page number still belonging to the previous search. query decides what this position belongs to - as long as it does not match the text in the search field, loading more is off, regardless of the order in which the effects start.

null in query is the initial state, which matches no search - including the empty one.

Constructors

Link copied to clipboard
constructor(query: String? = null, options: List<DropdownOption<T>> = emptyList(), nextPage: Long = 0, hasMore: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard