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

show / hide not working in riot 3 #2156

Closed
sourcegr opened this Issue Dec 14, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@sourcegr

sourcegr commented Dec 14, 2016

The show/hide={conditional} does not work as expected in Riot or am I missing something?

If the display:'' or display:'none' is not removed from the style of the element, then there is no way to show/hide an element depending on a variable value. The if is not an option, because it removes the element from the dom.

  1. Can you reproduce the issue?
    http://plnkr.co/edit/jcN4ZzzWRvSEffuTpfUl?p=preview
  • Question
  • Discussion
  • Feature request
@dranzd

This comment has been minimized.

Show comment
Hide comment
@dranzd

dranzd Dec 14, 2016

Is adding a class hidden (or any class name) on H1 works for you? Like this one here:
http://plnkr.co/edit/Wxs30MG1FW2nd37UepvV?p=preview

dranzd commented Dec 14, 2016

Is adding a class hidden (or any class name) on H1 works for you? Like this one here:
http://plnkr.co/edit/Wxs30MG1FW2nd37UepvV?p=preview

@sourcegr

This comment has been minimized.

Show comment
Hide comment
@sourcegr

sourcegr Dec 14, 2016

Hello @dranzd and thanks for the time you took to look it up!

Of cource it does and this is the way I currently accomplish what I want, but it is a workaround, irrelevant to the issue :)

Thanks again!

sourcegr commented Dec 14, 2016

Hello @dranzd and thanks for the time you took to look it up!

Of cource it does and this is the way I currently accomplish what I want, but it is a workaround, irrelevant to the issue :)

Thanks again!

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@GianlucaGuarini

GianlucaGuarini Dec 14, 2016

Member

@papas-source thanks for reporting it

Member

GianlucaGuarini commented Dec 14, 2016

@papas-source thanks for reporting it

@dranzd

This comment has been minimized.

Show comment
Hide comment
@dranzd

dranzd Dec 14, 2016

@papas-source I'm new to RiotJS and just started using it like a week ago. Was curious about where in the documentation I can find that hide/show conditional you mentioned. I just found it. I've tested and confirmed that it indeed does not work as you reported :).

Thanks, just found new way to hide/show elements (once it works again).

dranzd commented Dec 14, 2016

@papas-source I'm new to RiotJS and just started using it like a week ago. Was curious about where in the documentation I can find that hide/show conditional you mentioned. I just found it. I've tested and confirmed that it indeed does not work as you reported :).

Thanks, just found new way to hide/show elements (once it works again).

GianlucaGuarini added a commit that referenced this issue Dec 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment