Type alias FormItemProps

FormItemProps: {
    buttonIcon?: CarbonIcon;
    componentProps?: ViewProps;
    descriptionFirstHeader?: boolean;
    disabled?: boolean;
    dismissKeyboardOnPress?: boolean;
    helperText?: string;
    label?: string;
    lastItem?: boolean;
    onChange?: ((value) => void);
    onLongPress?: ((event) => void);
    onPress?: ((event) => void);
    overrideActiveCheckboxIcon?: CarbonIcon;
    renderToggleCheckboxLeft?: boolean;
    sliderProps?: {
        hideRangeLabels?: boolean;
        leftIcon?: CarbonIcon;
        maxValue?: number;
        minValue?: number;
        rightIcon?: CarbonIcon;
    };
    style?: StyleProp<ViewStyle>;
    textBreakMode?: TextBreakModes;
    textInputProps?: Partial<TextInputProps>;
    toggleValueText?: ((value) => string);
    type: FormItemType;
    value?: string | boolean;
}

Props for FormItem component

Type declaration

  • Optional buttonIcon?: CarbonIcon

    Icon to render for right side for type button. Usually this would be a RightChevron

  • 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 descriptionFirstHeader?: boolean

    Indicate that header should be description first

  • Optional disabled?: boolean

    Indicate if item is disabled

  • Optional dismissKeyboardOnPress?: boolean

    Indicate if keyboard should be dismissed onPress

  • Optional helperText?: string

    Helper text

  • Optional label?: string

    label to render

  • Optional lastItem?: boolean

    Indicate if last item of a group form (after is a break or header normally).

  • Optional onChange?: ((value) => void)
      • (value): void
      • On change event. This is a boolean for toggle or string for others.

        Parameters

        • value: string | boolean

        Returns void

  • Optional onLongPress?: ((event) => void)
      • (event): void
      • onLongPress event for button type

        Parameters

        • event: GestureResponderEvent

        Returns void

  • Optional onPress?: ((event) => void)
      • (event): void
      • onPress event for button type

        Parameters

        • event: GestureResponderEvent

        Returns void

  • Optional overrideActiveCheckboxIcon?: CarbonIcon

    Override icon for select item (default is Checkbox)

  • Optional renderToggleCheckboxLeft?: boolean

    Indicate that toggle or checkbox should render on the left side. Default is right

  • Optional sliderProps?: {
        hideRangeLabels?: boolean;
        leftIcon?: CarbonIcon;
        maxValue?: number;
        minValue?: number;
        rightIcon?: CarbonIcon;
    }

    Slider props for customizing slider

    • Optional hideRangeLabels?: boolean

      Indicate if range labels should be hidden (normally should hide if using icons)

    • Optional leftIcon?: CarbonIcon

      Icon to render on left side of slider

    • Optional maxValue?: number

      Max value for slider (defaults to 100)

    • Optional minValue?: number

      Min value for slider (defaults to 0)

    • Optional rightIcon?: CarbonIcon

      Icon to render on right side of slider

  • Optional style?: StyleProp<ViewStyle>

    Style to set on the item

  • Optional textBreakMode?: TextBreakModes

    Break mode for non editable text

  • Optional textInputProps?: Partial<TextInputProps>

    Text input props. Mostly used for events (blur/focus) and validation. Do not use value or onChange event. That is overriden by this component.

  • Optional toggleValueText?: ((value) => string)
      • (value): string
      • Toggle text exchange by value. This should show content on the UI like Yes/No or Off/On

        Parameters

        • value: boolean

        Returns string

  • type: FormItemType

    The type of form item

  • Optional value?: string | boolean

    Value to render or show for static data. This is not used for type header. Boolean is used for toggle and checkbox.

Generated using TypeDoc