Usage

React to a change outside the UI

This type is used by TextField

tsx
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} />;
}

Type declaration

ts
export interface SubmitEvent extends KuitoEvent<'submit'>, TextPayload {}

Members 4

NameTypeRequiredDescription
type"submit"Yes—
targetunknownYes—
isTrustedbooleanYes—
textstringYes—
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.