InlineSearchState

data class InlineSearchState(val query: String = "", val isSearching: Boolean = false, val isCompleted: Boolean = false, val resultCount: Int = 0, val selectedIndex: Int = -1)

Immutable UI state for the Compose inline search bar.

This is the host-agnostic, View-free state the com.pspdfkit.compose.search.composables.NutrientInlineSearchBar renders. It intentionally carries only display data (query, status, counts) — the actual SearchResult objects stay inside the fragment-flavor controller and are delivered to the highlighter via the result listener, so this type has no fragment-only dependencies.

selectedIndex is zero-based, or -1 when nothing is selected.

Constructors

Link copied to clipboard
constructor(query: String = "", isSearching: Boolean = false, isCompleted: Boolean = false, resultCount: Int = 0, selectedIndex: Int = -1)

Types

Link copied to clipboard
object Companion

Factory holder for common InlineSearchState values.

Properties

Link copied to clipboard

Whether there is a result after selectedIndex to navigate to.

Link copied to clipboard

Whether there is a result before selectedIndex to navigate to.

Link copied to clipboard

Whether the current search produced at least one result.

Link copied to clipboard

Whether the most recent search has finished (drives the "no matches" message).

Link copied to clipboard

Whether a search is currently running.

Link copied to clipboard

The current query string in the input field.

Link copied to clipboard

Number of results found by the current search.

Link copied to clipboard

Zero-based index of the selected result, or -1 when none is selected.

Link copied to clipboard

Whether the "no matches found" message should be shown.