Created
August 29, 2018 21:17
-
-
Save zomars/63c41c20433c7707473d87a89e78f3fc to your computer and use it in GitHub Desktop.
Render redux-form Fields component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const renderFields = fields => | |
Object.keys(fields).map((name, i) => { | |
if (!fields[name].input) return null; | |
return ( | |
<Grid item xs={12}> | |
<Field | |
key={name} | |
name={name} | |
label={fields.labels[i]} | |
{...fields[name]} | |
type="text" | |
/> | |
</Grid> | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment