@antadesign/anta
    Preparing search index...

    Type Alias SelectChangeAttrs<V>Unreviewed

    SelectChangeAttrs:
        | { value: V; option: SelectOption<V>; selected?: boolean }
        | { all: true; selected: boolean }

    Snapshot passed as the 2nd argument to onValueChange — describes what changed, alongside the new full value in the 1st argument. A discriminated union: a row toggle carries value + option; a bulk change (the "Select all" row, or the clearable "Clear" footer) carries all: true instead. Always narrow on 'all' in attrs before reading option — the all variant fires for single-select too (via clearable), not just multiple.

    Type Parameters

    Type Declaration

    • { value: V; option: SelectOption<V>; selected?: boolean }
      • Unreviewedvalue: V

        The option value that changed — the chosen value (single) or the toggled row (multiple).

      • Unreviewedoption: SelectOption<V>

        The resolved option object for value.

      • Optional Unreviewedselected?: boolean

        Multiple only: whether the change turned selection on (true) or off.

    • { all: true; selected: boolean }
      • Unreviewedall: true

        Marks the change as a bulk one with no single option: the "Select all" row (multiple), or the clearable "Clear" footer (single or multiple).

      • Unreviewedselected: boolean

        Whether the bulk change turned everything on (true) or cleared it (false — always false for a "Clear").