Accordion filter panels missing scroll for overflowing content
This commit is contained in:
committed by
Aditya Chandel
parent
480eb92f7d
commit
15970ad1b1
+34
-31
@@ -1,6 +1,5 @@
|
|||||||
@if (showFilter) {
|
@if (showFilter) {
|
||||||
<div
|
<div class="h-[calc(100vh-6.1rem)] rounded-xl bg-[var(--card-background)] flex flex-col">
|
||||||
class="h-[calc(100vh-6.1rem)] rounded-xl bg-[var(--card-background)]">
|
|
||||||
|
|
||||||
<div class="flex items-center justify-between px-4 py-4">
|
<div class="flex items-center justify-between px-4 py-4">
|
||||||
<span class="text font-semibold">Filter Mode</span>
|
<span class="text font-semibold">Filter Mode</span>
|
||||||
@@ -14,39 +13,43 @@
|
|||||||
styleClass="h-8"></p-selectButton>
|
styleClass="h-8"></p-selectButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p-accordion [value]="expandedPanels">
|
<div class="flex-1 overflow-y-auto pb-4">
|
||||||
@for (filterType of filterTypes; track filterType; let i = $index) {
|
<p-accordion [value]="expandedPanels">
|
||||||
<p-accordion-panel [value]="i">
|
@for (filterType of filterTypes; track filterType; let i = $index) {
|
||||||
<p-accordion-header>
|
<p-accordion-panel [value]="i">
|
||||||
<span class="inline-flex items-center gap-1">
|
<p-accordion-header>
|
||||||
{{ filterLabels[filterType] || (filterType | titlecase) }}
|
<span class="inline-flex items-center gap-1">
|
||||||
@if (activeFilters[filterType]?.length) {
|
{{ filterLabels[filterType] || (filterType | titlecase) }}
|
||||||
<span class="text-sm text-[var(--primary-color)]">
|
@if (activeFilters[filterType]?.length) {
|
||||||
({{ activeFilters[filterType].length }})
|
<span class="text-sm text-[var(--primary-color)]">
|
||||||
|
({{ activeFilters[filterType].length }})
|
||||||
|
</span>
|
||||||
|
}
|
||||||
</span>
|
</span>
|
||||||
}
|
</p-accordion-header>
|
||||||
</span>
|
|
||||||
</p-accordion-header>
|
|
||||||
|
|
||||||
<p-accordion-content class="h-[27.5rem] !overflow-y-auto">
|
<p-accordion-content class="h-[27.5rem]">
|
||||||
@if (filterStreams[filterType] | async; as filters) {
|
@if (filterStreams[filterType] | async; as filters) {
|
||||||
<div>
|
<div>
|
||||||
@for (filter of filters; track filter) {
|
@for (filter of filters; track filter) {
|
||||||
<div class="cursor-pointer transition-colors duration-200 ease-in-out pb-1 flex items-center gap-2"
|
<div
|
||||||
[ngClass]="{
|
class="cursor-pointer transition-colors duration-200 ease-in-out pb-1 flex items-center gap-2"
|
||||||
|
[ngClass]="{
|
||||||
'text-[var(--primary-color)]':
|
'text-[var(--primary-color)]':
|
||||||
activeFilters[filterType]?.includes(filter.value?.id || filter.value)
|
activeFilters[filterType]?.includes(filter.value?.id || filter.value)
|
||||||
}"
|
}"
|
||||||
(click)="handleFilterClick(filterType, filter.value?.id || filter.value)">
|
(click)="handleFilterClick(filterType, filter.value?.id || filter.value)">
|
||||||
<p-badge [value]="filter.bookCount"></p-badge>
|
<p-badge [value]="filter.bookCount"></p-badge>
|
||||||
{{ filter.value.name || filter.value }}
|
{{ filter.value.name || filter.value }}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</p-accordion-content>
|
</p-accordion-content>
|
||||||
</p-accordion-panel>
|
</p-accordion-panel>
|
||||||
}
|
}
|
||||||
</p-accordion>
|
</p-accordion>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user