question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When ngFor used within accordion body accordion does not resize appropriately.

See original GitHub issue

Issue type

I’m submitting a … (check one with “x”)

  • bug report
  • feature request

Issue description

When ngFor is used within an accordion body, the body does not resize appropriately when toggled. The body only seems to resize to static content.

Steps to reproduce:

Related code:

<nb-accordion>
      <nb-accordion-item>
                <nb-accordion-item-body>
                          <div *ngFor="let q of questions">{{ q }}</div>
                 </nb-accordion-item-body>
      </nb-accordion-item>
</nb-accordion>

Angular, Nebular

Angular: 6.1.7
Nebular: 2.0.0-rc.10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

8reactions
diegoalexcommented, Oct 18, 2018

Hi Guys, I did a workaround to fix my code until we have a new version released.

I’m using just this peace of scss in the component I have the accordion.

/deep/ nb-accordion-item.expanded nb-accordion-item-body { .ng-trigger-accordionItemBody { height: auto !important; } }

I hope it will help u guys too 😉

0reactions
MarcoFiuscocommented, Nov 21, 2018

@diegoalex Thank you for the solution!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does this accordion stops working when placed inside ...
It works when it is outside ngFor the moment I place it inside it stops working as the accordion does not open. Btw...
Read more >
Strange behavior of Bootstrap Accordion Expand Height with ...
If you collapse the tab that contains the D3 layout and expand it again, the svg's height is fine, but the container it...
Read more >
Table - PrimeNG - PrimeFaces
Table is a template driven component with named templates such as header and body that we've used so far. Templates grant a great...
Read more >
Angular collapse not resizing correctly
Hello, the Angular collapse panel is not resizing correctly when the data to display comes from the component. It works correctly with static...
Read more >
Clustering 4000 Stack Overflow tags with BigQuery k-means
Then I can use that string to get a huge table, with a 1 for every ... overflow, less, css-position, react-bootstrap, border, accordion,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found