I've implemented the PrimeNG library's accordion component in my angular project. You can find more information here.
In my template, I have some custom css styling for printing the page that looks like this:
@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;
}
}
My goal is to automatically expand all accordionTab
elements when the page is being printed. I know each accordionTab
has a [selected]
property that can be set to "true" to expand it.
The selected property determines the visibility of the content and supports one or two-way binding.
Is there a way to trigger this automatically when the page is being printed using @media print
?
Thank you!