acces form outside
Hello, when I acces form from outside for ie formApi.getValues(), I get an empty object even if I write in inputs something. PS: If i put a button inside the form I can get values from te inputs with formApi .getValues(). many thanks!
` import React, { PureComponent } from 'react'; import { Form, Text } from 'informed'; import { CustomInput } from '~customs';
export default class App extends PureComponent { constructor(props) { super(props); this.formApi = null; }
render() {
return (
<div>
<Form id="formID" getApi={formApi => this.formApi = formApi}>
{
({ formState, formApi }) => (
<>
<Text field="name" />
<CustomInput field="custom" label="Custom Input" />
</>
)
}
</Form>
<button type="button" onClick={ev => console.log(this.formApi.getValues())} />
</div>
);
}
}
`
Can u create a codesandbox for this issue
Can u create a codesandbox for this issue
Sandbox works perfectly: https://codesandbox.io/s/funny-villani-0k5hc
Is on my side apperently. I have a LayoutPage and i think here is the problem. <LayoutPage header={