Package dev. fritz2. components. typeAhead
Types
Proposal
Link copied to clipboard
This type alias defines the type of the proposal function of a TypeAheadComponent
The typical pattern of writing such a function is to start with the implicit it and use common Flow operators on it (pun intended):
// just map the draft to a list:
val proposal: Proposal = {
it.map { draft -> /* ... some API call or alike */}
}
// combine the draft with some other Flow (controlled by some other component)
val languages = storeOf(listOf("Kotlin", "Scala", "Java", "OCaml", "Haskell"))
val proposal: Proposal = {
it.combine(languages.data) { draft, languages -> /* check if draft is contained or alike */}
}
TypeAheadComponent
Link copied to clipboard
open class TypeAheadComponent(valueStore: Store<String>?, items: Proposal) : Component<Input> , InputFormProperties, SeverityProperties, InputFieldProperties
Content copied to clipboard
This component class manages the configuration of a TypeAheadComponent and does the rendering.
Functions
asProposal
Link copied to clipboard