HeaderSearch
The search field a screen's header carries.
Verwendung
Connect header search to a query.
// Connect header search to a query.
import { signal, type HeaderSearch, type RouteOptions } from 'kuito';
const query = signal('');
const search: HeaderSearch = {
placeholder: 'Search shows',
onChange: (text) => (query.value = text),
onSubmit: (text) => console.log('search for', text),
};
export const options: RouteOptions = { title: 'Shows', header: { largeTitle: true, search } };Typdeklaration
export interface HeaderSearch {
placeholder?: string;
/** The text as the user types it. */
onChange: (text: string) => void;
/** The user pressed the search key. */
onSubmit?: (text: string) => void;
}Mitglieder 3
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
placeholder | string | Nein | — |
onChange | (text: string) => void | Ja | The text as the user types it. |
onSubmit | (text: string) => void | Nein | The user pressed the search key. |
onChange — Methodensignaturen
Signaturen
(text: string): voidParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
text | string | Ja | — |
Rückgabe
void
onSubmit — Methodensignaturen
Signaturen
(text: string): voidParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
text | string | Ja | — |
Rückgabe
void
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.