When using the InputNumber component with a lodash-type name, like : name={`operacion.inmuebles.${index}.valor_compraventa`} and when a value is written in the input
Code: Select all
<InputNumber
id={name} name={name} value={formik.values[name]}
onValueChange={formik.handleChange}
className={classNames('p-component', { 'p-invalid': isFormFieldValid(name) })}
tooltipOptions={{ position: 'bottom' }}
tooltip="Valor en euros. Solo valores positivos."
mode="currency" currency="EUR" locale="es-ES"
name={`operacion.inmuebles.${index}.valor_compraventa`} formik={props.formik} label="Valor compraventa*"
icon={<i className="pi pi-euro"/>}
>
</InputNumber>
However, if a simple name is given to the InputNumber, such as name='hi', everything works as expected.
If such lodash-style name is given to an InputText component, everything works, as the inputwrapper is not there.
Any thoughts on hoy can be this overcome/corrected? (besides using the InputText or flattening all the object, as this must be a typical use case in realistic scenarios)
Thanks.