Type alias DropdownProps

DropdownProps: {
    closeText?: string;
    componentProps?: ViewProps;
    disabled?: boolean;
    helperText?: string;
    items: DropdownItem[];
    label?: string;
    light?: boolean;
    maxMenuHeight?: number;
    onChange: ((item) => void);
    style?: StyleProp<ViewStyle>;
    unsetText: string;
    value: string;
    valueToText?: ((value) => string);
}

Props for Dropdown component

Type declaration

  • Optional closeText?: string

    Text to use for on close areas (accessibility). Defaults to ENGLISH "Close"

  • Optional componentProps?: ViewProps

    Direct props to set on the React Native component (including iOS and Android specific props). Most use cases should not need this.

  • Optional disabled?: boolean

    Indicate if disabled

  • Optional helperText?: string

    Helper string to use

  • items: DropdownItem[]

    Items to render in the dropdown

  • Optional label?: string

    Label string to use

  • Optional light?: boolean

    Indicate if dropdown is used on layer

  • Optional maxMenuHeight?: number

    Height in pixels to max out the menu (defaults to 280)

  • onChange: ((item) => void)
      • (item): void
      • On change callback

        Parameters

        Returns void

  • Optional style?: StyleProp<ViewStyle>

    Style to set on the item

  • unsetText: string

    Unset text. This should be like "Choose option" or similar based on context

  • value: string

    Current value to show on dropdown

  • Optional valueToText?: ((value) => string)
      • (value): string
      • Callback to convert value to human readable text

        Parameters

        • value: string

        Returns string

Generated using TypeDoc