Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(Popup): defaultOpen prop #659

Merged
merged 4 commits into from
Dec 20, 2018
Merged

fix(Popup): defaultOpen prop #659

merged 4 commits into from
Dec 20, 2018

Conversation

mnajdova
Copy link
Contributor

This PR fixes #657 - defaultOpen prop on the Popup is not working.

@@ -183,8 +183,6 @@ export default class Popup extends AutoControlledComponent<ReactProps<PopupProps
}
}

public state = { target: undefined, open: false }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to raise attention, there is an issue currently in Autocontrolled component. It doesn't allow to have both autocontrolled and non-controlled state.
Created this 1 week ago - #610

Because it might be needed to have an initial state explicitly set for target

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the target is also an auto-controlled prop in this case, so it is safe to be removed.

Copy link
Contributor

@kuzhelov kuzhelov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mnajdova mnajdova merged commit 18e546a into master Dec 20, 2018
@layershifter layershifter deleted the fix/popup-default-open-prop branch January 10, 2019 11:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Popup defaultOpen is not working
3 participants