TextSelection
A range of a TextField's text, for reading or setting the caret and what the user selected.
Utilização
React to a change outside the UI
Este tipo é usado por TextField
import { TextField, signal, watch } from 'kuito';
export function Search(props: { search: (query: string) => void }) {
const query = signal('');
watch(query, (text) => {
const timer = setTimeout(() => props.search(text), 250);
return () => clearTimeout(timer);
});
return <TextField label="Search" value={query} />;
}Declaração do tipo
export interface TextSelection {
start: number;
end: number;
}Membros 2
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
start | number | Sim | — |
end | number | Sim | — |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.