I am currently using the PrimeNG library's accordion component in my angular project. See info here.
The template includes some special css styling for printing the page--something like the following:
@media print {
.profile-progress-bar, .top-template-header-content, .header.profile-header{
display: none !important;
}
html, body {
height: auto;
font-size: 10px !important;
}
p-accordionTab > div {
display: block !important;
selected: true !important;
}
}
What I am trying to do, is automatically expand all accordionTab
elements when the @media print
rendering is processed for the page to be printed.
From the documentation I see that each accordionTab
element has a [selected]
property which can be bound to and set to "true" in order to expand the tab.
Selected Visibility of the content is specified with the selected property that supports one or two-way binding.
However, can this be somehow automatically triggered when the @media print
rendering occurs?
Thanks!