Last active
September 6, 2019 06:51
-
-
Save landrysoules/28e3bc606b968617665d0d3a8219dfb0 to your computer and use it in GitHub Desktop.
Simplifier le code sur des closures :
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
<FieldArray name="sections" subscription={{}}> | |
{({ fields }) => { | |
return ( | |
<SortableContainer onSortEnd={fields.move} useDragHandle> | |
{fields.map((name, index) => ( | |
<AuditModelSection | |
key={name} | |
sectionIndex={index} | |
index={index} | |
moveSection={fields.move} | |
/> | |
))} | |
</SortableContainer> | |
); | |
}} | |
</FieldArray>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment