Add a `updateChildren` boolean prop to transition components
This prop will be useful to disable children render when necessary, for example in such cases :
<Collapse in={collection.length > 0} updateChildren={collection.length > 0}>
{collection.map(item => <Item value={item} />)}
</Collapse>
If updateChildren
is always true
(as it is now), the list of items will disappear at the same time the closing animation starts. Setting updateChildren
to false
when collection is empty will prevent this visual glitch.