Skip to content
Docs
Components
Inputs
Select

Select

Component to select an item between several options.

Import

import { Select, Option } from 'react-native-ficus-ui';

Usage

Props

Extends every Box props.

title

The title of select modal.

TypeRequired
stringReact.ReactNode

message

The text message (after title) of select modal.

TypeRequired
stringReact.ReactNode

data

The data array object with different options.

TypeRequired
any[]Yes

value

The value object of selection (array on single object, depends of isMultiple prop).

TypeRequired
anyYes

renderItem

The render function to render an option, you can use Option component inside it.

TypeRequired
(item: any, index: number) => React.ReactElementYes

keyExtractor

Method to extract an unique key for each option (the component is using a FlatList to display them).

TypeRequired
(item: any, index: number) => stringNo

showScrollIndicator

Boolean to indicate if the scroll indicator must be shown on options list.

TypeRequired
booleanNo

submit

Boolean indicating if we need a submit button to validate the selection.

TypeRequiredDefault
booleanNofalse

renderSubmitButton

Render function for submit button/component.

TypeRequired
() => React.ReactElementNo

onSelect

Method called when an option is selected/validated.

TypeRequired
(value: any) => voidNo

submitText

The text on submit button.

TypeRequired
stringNo

isMultiple

Boolean indicating if the user can select multiple options. When this option is enabled, the user must submit the selection.

TypeRequiredDefault
booleanNofalse