tuil
ReferenceComponentsTransfer list

TransferListProps

TransferListProps component contract.

View rawEdit

Type

export interface TransferListProps<TData = unknown>
  extends CommonComponentProps,
    SlottedComponentProps<
      TransferListSlots,
      {
        readonly focused: boolean;
        readonly side: TransferSide;
        readonly activeIndex: number;
      }
    > {
  readonly items: readonly TransferListItem<TData>[];
  readonly value?: readonly string[];
  readonly defaultValue?: readonly string[];
  readonly onValueChange?: (
    selectedIds: readonly string[],
  ) => void | Promise<void>;
  readonly onTransfer?: (
    item: TransferListItem<TData>,
    direction: "select" | "remove",
  ) => void | Promise<void>;
  readonly availableTitle?: string;
  readonly selectedTitle?: string;
  readonly height?: number;
  readonly autoFocus?: boolean;
}

Members

MemberTypeRequiredDescriptionRelated types
itemsreadonly TransferListItem<TData>[]YesThe items member uses the readonly TransferListItem<TData>[] contract.—
valuereadonly string[] | undefinedNoThe value member uses the readonly string[] | undefined contract.—
defaultValuereadonly string[] | undefinedNoThe defaultValue member uses the readonly string[] | undefined contract.—
onValueChange((selectedIds: readonly string[]) => void | Promise<void>) | undefinedNoThe onValueChange member uses the ((selectedIds: readonly string[]) => void | Promise<void>) | undefined contract.—
onTransfer((item: TransferListItem<TData>, direction: "select" | "remove") => void | Promise<void>) | undefinedNoThe onTransfer member uses the ((item: TransferListItem<TData>, direction: "select" | "remove") => void | Promise<void>) | undefined contract.—
availableTitlestring | undefinedNoThe availableTitle member uses the string | undefined contract.—
selectedTitlestring | undefinedNoThe selectedTitle member uses the string | undefined contract.—
heightnumber | undefinedNoThe height member uses the number | undefined contract.—
autoFocusboolean | undefinedNoThe autoFocus member uses the boolean | undefined contract.—
variantstring | undefinedNoThe variant member uses the string | undefined contract.—
size"sm" | "md" | "lg" | undefinedNoThe size member uses the "sm" | "md" | "lg" | undefined contract.—
unstyledboolean | undefinedNoThe unstyled member uses the boolean | undefined contract.—
classNamestring | undefinedNoThe className member uses the string | undefined contract.—
layoutPartial<Omit<LayoutNodeInput, "children" | "id" | "semantics">> | undefinedNoThe layout member uses the Partial<Omit<LayoutNodeInput, "children" | "id" | "semantics">> | undefined contract.—
idstring | undefinedNoThe id member uses the string | undefined contract.—
testIdstring | undefinedNoThe testId member uses the string | undefined contract.—
roleSemanticRole | undefinedNoThe role member uses the SemanticRole | undefined contract.SemanticRole
labelstring | undefinedNoThe label member uses the string | undefined contract.—
descriptionstring | undefinedNoThe description member uses the string | undefined contract.—
disabledboolean | undefinedNoThe disabled member uses the boolean | undefined contract.—
readOnlyboolean | undefinedNoThe readOnly member uses the boolean | undefined contract.—
selectedboolean | undefinedNoThe selected member uses the boolean | undefined contract.—
checkedboolean | undefinedNoThe checked member uses the boolean | undefined contract.—
expandedboolean | undefinedNoThe expanded member uses the boolean | undefined contract.—
valueTextstring | undefinedNoThe valueText member uses the string | undefined contract.—
slotsPartial<SlotComponents<&#123; root: import("ink").BoxProps; panel: import("ink").BoxProps; title: import("ink").TextProps; item: import("ink").TextProps; controls: import("ink").TextProps; empty: import("ink").TextProps; overflow: import("ink").TextProps; &#125;>> | undefinedNoThe slots member uses the Partial<SlotComponents<&#123; root: import("ink").BoxProps; panel: import("ink").BoxProps; title: import("ink").TextProps; item: import("ink").TextProps; controls: import("ink").TextProps; empty: import("ink").TextProps; overflow: import("ink").TextProps; &#125;>> | undefined contract.BoxProps, SlotComponents, TextProps
slotPropsPartial<SlotProps<&#123; root: import("ink").BoxProps; panel: import("ink").BoxProps; title: import("ink").TextProps; item: import("ink").TextProps; controls: import("ink").TextProps; empty: import("ink").TextProps; overflow: import("ink").TextProps; &#125;, &#123; readonly focused: boolean; readonly side: "available" | "selected"; readonly activeIndex: number; &#125;>> | undefinedNoThe slotProps member uses the Partial<SlotProps<&#123; root: import("ink").BoxProps; panel: import("ink").BoxProps; title: import("ink").TextProps; item: import("ink").TextProps; controls: import("ink").TextProps; empty: import("ink").TextProps; overflow: import("ink").TextProps; &#125;, &#123; readonly focused: boolean; readonly side: "available" | "selected"; readonly activeIndex: number; &#125;>> | undefined contract.BoxProps, SlotProps, TextProps

Source

View the secondary source reference

On this page