Skip to content

Commit f29a72f

Browse files
authored
Merge pull request #258 from OpenGeoscience/dataset-list-height
Fix dataset list height when tag filter expanded
2 parents 8365a72 + d451c8d commit f29a72f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

web/src/components/DatasetList.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const props = defineProps<{
1111
1212
const searchText = ref<string | undefined>();
1313
const selectedTags = ref<string[]>();
14+
const showFilter = ref();
1415
const filteredDatasets = computed(() => {
1516
return props.datasets?.filter((dataset: any) => {
1617
const searchMatch = !searchText.value ||
@@ -60,8 +61,8 @@ watch(filteredDatasets, expandAllGroups)
6061
append-inner-icon="mdi-magnify"
6162
hide-details
6263
/>
63-
<v-expansion-panels flat v-if="props.datasets?.length">
64-
<v-expansion-panel class="mb-2 bg-transparent">
64+
<v-expansion-panels v-model="showFilter" flat v-if="props.datasets?.length">
65+
<v-expansion-panel value="true" class="mb-2 bg-transparent">
6566
<v-expansion-panel-title class="tag-filter-title">
6667
Filter by Tag
6768
</v-expansion-panel-title>
@@ -78,7 +79,7 @@ watch(filteredDatasets, expandAllGroups)
7879
</v-expansion-panel-text>
7980
</v-expansion-panel>
8081
</v-expansion-panels>
81-
<v-card class="panel-content-inner with-tag-filter">
82+
<v-card :class="showFilter ? 'panel-content-inner with-tag-filter-open' : 'panel-content-inner with-tag-filter-closed'">
8283
<v-expansion-panels
8384
v-if="props.datasets?.length"
8485
v-model="expandedGroups"
@@ -160,7 +161,12 @@ watch(filteredDatasets, expandAllGroups)
160161
min-height: 0px!important;
161162
font-size: inherit!important;
162163
}
163-
.panel-content-inner.with-tag-filter {
164-
height: calc(100% - 75px);
164+
165+
.panel-content-inner.with-tag-filter-open {
166+
height: calc(100% - 120px);
167+
}
168+
169+
.panel-content-inner.with-tag-filter-closed {
170+
height: calc(100% - 80px);
165171
}
166172
</style>

0 commit comments

Comments
 (0)