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

Popup - displays empty content, bug? #2032

Closed
adam-26 opened this issue Aug 31, 2017 · 7 comments
Closed

Popup - displays empty content, bug? #2032

adam-26 opened this issue Aug 31, 2017 · 7 comments
Labels

Comments

@adam-26
Copy link
Contributor

adam-26 commented Aug 31, 2017

Steps

Define a popup, without any of these props:

  • children
  • content
  • header

Expected Result

I would expect the popup not to be displayed

Actual Result

An empty popup is displayed

Version

0.72.0

Testcase

https://codepen.io/anon/pen/qXLGjK

If empty content prevented the popup from displaying, it would be very easy only activate the popup for specific conditions. A specific use-case would be form validation using a popup.

Is there another way to achieve the same behavior? I see the open prop in the documentation, but setting this to false does not prevent a popup from opening, it only closes an open popup.

Thanks.

@cdaringe
Copy link
Contributor

opening the codepen results in an infinite reload loop from me. not sure if it's your code or codepen. also having Popup issues today

@adam-26
Copy link
Contributor Author

adam-26 commented Aug 31, 2017

@cdaringe its working in my browser - I opened it in Chrome... what browser(s) are you using?

@cdaringe
Copy link
Contributor

cdaringe commented Sep 1, 2017

ya, looks like it was probably a codepen bug. it works now!

@layershifter
Copy link
Member

This is not bug, all other our components have the same behaviour. The visibility of Popup should be controlled with open prop, however it's compicated until #1190 will be merged.

@adam-26
Copy link
Contributor Author

adam-26 commented Sep 1, 2017

@layershifter, thanks for your response. You say that the open prop should control visibility... if this is true, then the controlled popup example should never open, even when it is clicked - as the popup is assigned an initial open: false value.

The open prop from what I understand can be used to close the popup, but it doesn't control visibility.

So, there is no way to control a popup visibility? Is the behavior of the open prop a bug? If so, I'll open a new issue...

@layershifter
Copy link
Member

layershifter commented Sep 1, 2017

@adam-26

should never open,

Why?

See example of controlled Modal. Popup has a same behaviour because it also relies on Portal, but there is problem with initial position (#1190).

@adam-26
Copy link
Contributor Author

adam-26 commented Sep 2, 2017

@layershifter, thanks for the response. The Portal openOnTrigger* props was what I needed.

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

No branches or pull requests

3 participants