taiga-ui icon indicating copy to clipboard operation
taiga-ui copied to clipboard

🐞 - tuiAccordionItemContent SSR issue during hydration

Open KhaledGabr opened this issue 8 months ago • 1 comments

Playground Link

No response

Description

image

As you notice in the picture, the accordion item content gets repeated twice. (It's created once in the server, and once in the browser, and thus fails to reconcile during hydration).

  @for (item of value().questions; track $index) {
    <tui-accordion [rounded]="false">
      <tui-accordion-item [borders]="null" [open]="true">
        <p class="tui-text_h4 question">
          {{ item.question }}
        </p>
        <ng-template tuiAccordionItemContent>
          <p class="tui-text_body-m answer">
            {{ item.answer }}
          </p>
        </ng-template>
      </tui-accordion-item>
    </tui-accordion>
  }

Angular version

18.0.3

Taiga UI version

3.83.0

Which browsers have you used?

  • [X] Chrome
  • [ ] Firefox
  • [ ] Safari
  • [ ] Edge

Which operating systems have you used?

  • [ ] macOS
  • [X] Windows
  • [ ] Linux
  • [ ] iOS
  • [ ] Android

KhaledGabr avatar Jun 14 '24 02:06 KhaledGabr