bietkul / react-reactive-form

Angular like reactive forms in React.
MIT License
309 stars 32 forks source link

how to inject external props into the react-form .props not able to print in the form #10

Closed sred36 closed 6 years ago

sred36 commented 6 years ago

this.props.dbList iam receiveing props from API But i am not able to print inside the FieldControl But i can able to print in render method not in form,Can you provide some examples to inject props into FiedComtrol <FieldGroup control={this.mssqlForm} render={({ get, invalid }) => (

(
)} />
bietkul commented 6 years ago

Hey @sred36 I think you're getting the data in this.props.dbList but unable to re-render the field control because of the strict property which is set to true ( default ) for performance reasons.

Use it like that

   <FieldControl
     name="dbname"
     strict={false}
    />
sred36 commented 6 years ago

it is working now,when i use like this <FieldGroup strict={false}
/>

Thanks lot..

bietkul commented 6 years ago

👍