Skip to content

parentSelector does not cause DOM update #468

Open
@rplotkin

Description

@rplotkin

Really, the issue is that the parentSelector will not cause a DOM update if the modal is not open when the parentSelector is changed. In componentWillReceiveProps,

if (!this.props.isOpen && !isOpen) return;
var currentParent = getParentElement(this.props.parentSelector);
var newParent = getParentElement(newProps.parentSelector);

which means that, if the component is closed, newParent becomes currentParent in this cycle, and then the equality check is always true, even though the component did not get moved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions