ValueChangeEvent
A change event carrying a boolean value, as a Toggle reports being switched on or off.
Utilização
Read the boolean payload of a native control event.
// Read the boolean payload of a native control event.
import { signal, type ValueChangeEvent } from 'kuito';
export const enabled = signal(false);
export function receiveValue(event: ValueChangeEvent) {
enabled.value = event.value;
}
// Toggle's onChange receives the boolean directly, not this event object.Declaração do tipo
export interface ValueChangeEvent extends KuitoEvent<'change'>, ValuePayload {}Membros 4
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
type | "change" | Sim | — |
target | unknown | Sim | — |
isTrusted | boolean | Sim | — |
value | boolean | 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.