Interface OptionProps<Option, IsMulti, Group>

Type Parameters

  • Option = unknown

  • IsMulti extends boolean = boolean

  • Group extends GroupBase<Option> = GroupBase<Option>

Hierarchy

Properties

children: ReactNode

The children to be rendered.

className?: string
clearValue: (() => void)

Type declaration

    • (): void
    • Returns void

cx: CX
data: Option

The data of the selected option.

getStyles: GetStyles<Option, IsMulti, Group>

Get the styles of a particular part of the select. Pass in the name of the property as the first argument, and the current props as the second argument. See the styles object for the properties available.

getValue: (() => <internal>.Options<Option>)

Type declaration

hasValue: boolean
innerProps: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>

props passed to the wrapping element for the group.

innerRef: ((instance: null | HTMLDivElement) => void)

Type declaration

    • (instance: null | HTMLDivElement): void
    • Inner ref to DOM Node

      Parameters

      • instance: null | HTMLDivElement

      Returns void

isDisabled: boolean

Whether the option is disabled.

isFocused: boolean

Whether the option is focused.

isMulti: boolean
isRtl: boolean
isSelected: boolean

Whether the option is selected.

label: string

Text to be displayed representing the option.

options: OptionsOrGroups<Option, Group>
selectOption: ((newValue: Option) => void)

Type declaration

    • (newValue: Option): void
    • Parameters

      • newValue: Option

      Returns void

selectProps: <internal>.Props<Option, IsMulti, Group>
setValue: ((newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option) => void)

Type declaration

type: "option"

Type is used by the menu to determine whether this is an option or a group. In the case of option this is always option. *

Generated using TypeDoc