Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'open' prop does not control modal #338

Open
PatrickKing opened this issue Sep 2, 2023 · 0 comments
Open

'open' prop does not control modal #338

PatrickKing opened this issue Sep 2, 2023 · 0 comments

Comments

@PatrickKing
Copy link

When using a reactjs-popup modal in a simple use case, the 'open' prop doesn't control the modal. Clicking on the modal backdrop will cause the modal to close.

      <Popup modal open = { true }>
        <span> Modal content </span>
      </Popup>

This seems like I may have missed something. Or perhaps Popup isn't a really controlled component?

Version

2.0.5

Test Case

      <Popup modal open = { true }>
        <span> Modal content </span>
      </Popup>

Expected Behavior

When clicking on the backdrop, the popup honours the value of the 'open' prop and remains open.

Actual Behavior

The popup closes, ignoring the value of the 'open' prop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant