Saltar al contenido principal

Selector

Usage

Instalar dependencias

Requiere instalar el módulo @react-native-picker/picker > 2.5.1

npm i @react-native-picker/picker

Seguir los pasos de la documentación

import {FormController} from '@rn-punikit/base'
import {useForm} from 'react-hook-form'

export default () => {

const {control} = useForm({
defaultValues: {
category: '',
},
})

return (
<FormController
type={'selector'}
control={control}
fieldId={'category'}
fieldConfig={{
label: 'Nombre',
}}
/>
)
}

Props

FormOptionPickerConfig

TipodescriptionTipo
optionsLabel del campoArray< FormOptionPickerValue >

Tipos

FormOptionPickerValue

TipodescriptionTipo
nameLabel del campostring
valueValor del campostring