mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 03:08:34 +00:00
fixup! @uppy/informer: simplify render method (#3931)
This commit is contained in:
parent
386d72d9f4
commit
5fca61733d
1 changed files with 4 additions and 2 deletions
|
|
@ -264,10 +264,12 @@ class TransitionGroup extends Component {
|
|||
render ({ childFactory, transitionLeave, transitionName, transitionAppear, transitionEnter, transitionLeaveTimeout, transitionEnterTimeout, transitionAppearTimeout, component, ...props }, { children }) {
|
||||
// TODO: we could get rid of the need for the wrapper node
|
||||
// by cloning a single child
|
||||
const childrenToRender = Object.values(children).filter(Boolean).map(child => {
|
||||
const childrenToRender = Object.entries(children).map(([key, child]) => {
|
||||
if (!child) return undefined
|
||||
|
||||
const ref = linkRef(this, key);
|
||||
return cloneElement(childFactory(child), { ref, key })
|
||||
})
|
||||
}).filter(Boolean)
|
||||
|
||||
return h(component, props, childrenToRender)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue