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

Render behavior different with nested components using <include...> and <@xxxxx> #1021

Closed
vinej opened this issue Mar 17, 2018 · 1 comment
Closed

Comments

@vinej
Copy link

vinej commented Mar 17, 2018

Bug Report

Rendering behavior is different with nested components using <include...> and <@...>

Marko Version: 4.9.0

Details

I created a panel component like that

<div class="panel-header">
    <include(input.header)/>
</div>
<div class="panel-content">
    <include(input.content)/>
</div>
<div class="panel-footer">
    <include(input.footer)/>
</div>

After I defined another component like that (partial code for exemple)

<panel>
  <@header>List of companies</@header>
  <@content> 
      <div>
        <ul>
        <for (cie in state.companies>
          <li key=cie.code class="animated bounce">${cie.code}</li>
        </for>
        </ul>
        </div>
    </@content>
    <@footer>JYV</@footer>
</panel>
<div>
   <ul>
    <for (cie in state.companies>
        <li key=cie.code class="animated bounce">${cie.code}</li>
    </for>
    </ul>
</div>

Bug with rendering

  • when I add a new company to the list, the list inside the <panel> is refresh completely. I added a bouncing transition to see the behavior : all the list is bouncing.

  • The list outside the <panel> is working as expected. When I add a new company into the list only the new company is bouncing, that means that only the new company has been added into the DOM.

Thanks

Jean-Yves

@DylanPiercey
Copy link
Contributor

Given the version of Marko here, it was likely a diffing issue that is now fixed.

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

2 participants