Skip to content

TransitionGroup wrapper interferes with a component's refs #1950

@bjbrewster

Description

@bjbrewster

Hello

We've encountered unexpected behaviour when wrapping list items that have refs (eg <input ref={key} key={key} />) in a TransitionGroup. The refs are no longer found in the component's this.refs unless you wrap each item in an extra element (eg <div key={key}><input ref={key} /></div>). The problem only seems to occur with TransitionGroup. CSSTransitionGroup works fine and I created my own test wrapper component which also worked.

Please see attached fiddle for contrived example that should focus the new list item when you click the button: http://jsfiddle.net/Zimble/gsj3E/10/

Many thanks,
Brendan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions