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

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

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

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

besummering opened this issue Jan 14, 2017 · 4 comments
Labels

Comments

@besummering
Copy link

@besummering besummering commented Jan 14, 2017

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
Copy link
Contributor

@syuilo syuilo commented Jan 14, 2017

The problem of virtual tag rendering has already been reported

@infrared
Copy link

@infrared infrared commented Mar 13, 2018

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.