Virtual tag doesn't work with each in server side rendering #2220

Closed
besummering opened this Issue Jan 14, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@besummering

Help us to manage our issues by answering the following:

  1. Describe your issue:
    When I do serverside riot.render with tag like the following, the virtual tag and it's content is omitted.
<mytag>
  <li>
      <virtual each={ e in [1,2] }><p>{ e }</p></virtual>
   </li>
</mytag>

it renders like this

<mytag>
 <li></li>
</mytag>

Besides, what is the expected behavior for virtual tag in server side render? I expected virtual tag itself should be omitted. Currently it behaves like the following

<mytag>
  <li>
      <virtual if={true} ><p> a </p></virtual>
   </li>
</mytag>

server side render as:
<mytag><li> <virtual><p> a </p></virtual> </li></mytag>

  1. Can you reproduce the issue?

Post the link using one of our bug report templates:

  1. On which browser/OS does the issue appear?

ubuntu

  1. Which version of Riot does it affect?

3.0.7

  1. How would you tag this issue?
  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@syuilo

This comment has been minimized.

Show comment
Hide comment
@syuilo

syuilo Jan 14, 2017

Contributor

The problem of virtual tag rendering has already been reported

Contributor

syuilo commented Jan 14, 2017

The problem of virtual tag rendering has already been reported

@GianlucaGuarini

This comment has been minimized.

Show comment
Hide comment
@infrared

This comment has been minimized.

Show comment
Hide comment
@infrared

infrared Mar 13, 2018

Should this be reopened? I see that #2081 was closed but it seems the virtual loop is still an issue:

plnkr

Should this be reopened? I see that #2081 was closed but it seems the virtual loop is still an issue:

plnkr

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