6
votes

I'm working with multiple panels and I added functionality to expand/collapse them all. My issue is that when I expand them I see an ugly corruption text from all the panels. Does anyone know how to fix that? Here's my working code: PLUNKER

 <p-panel header="Panel 1" [toggleable]="true" [collapsed]="collapsed" [style]="{'margin-bottom':'20px'}">

 The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding.
His beloved son Michael has just come home from the war, but does not intend to become part of his father's business.
Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family,
kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family.

</p-panel> 
2
Define corruption please.Aluan Haddad
am not gonna add it as an answer but you can find the explication here : stackoverflow.com/questions/48731110/… ;)Temani Afif
all your elements overlap and thus all the content is going aboveTemani Afif
@TemaniAfif : I was just about to link your question. Good Readkarthick

2 Answers

5
votes

Hey not that familiar with angular nor the library you are using there. But you can avoid the overlapping part with some background and by setting a position attribute.

.ui-panel {
  position: relative;
}
.ui-panel .ui-panel-content.ui-widget-content { 
     background: white;
}
0
votes

That is because you are trying to open all of them at once, and if you see closely, when you close them, they are all very close to each other, and then when you open them out, they overlap, now, I'm not sure if that is intended, but how they should open is just start from their current positions and spread down, just like when you collapse/extend only ONE of them.