I'm trying to achieve the following layout.
- The grey container shall spread over the whole viewport but shall not be larger
- The green
v-row
shall fill the grey container v-col
1 shall fill the available space, a scrollbar shall be added if necessaryv-col
2 shall fill the available space and shrink if necessaryv-col
3 shall always be on the bottom and only take the necessary space
So far I have the following. The problem is that '1' doesn't turn scrollable but instead pushes '2' and '3' out of the viewport. What am I doing wrong?
Bonus question: Is there a better way to have the container fill the viewport? 100% doesn't work for me for some reason.
Even more bonus: Would it be easier to achieve this with only regular div
s?
<template>
<v-app>
<v-container class="ma-0 pa-0 d-flex full-height">
<v-row no-gutters class="d-flex flex-column flex-nowrap flex-1-0-100">
<!-- column 1 -->
<v-col class="overflow-y-auto flex-1-0">
<v-list :items="dummy"></v-list>
</v-col>
<!-- column 2 -->
<v-col class="d-flex justify-center flex-1-1-100">
<v-btn color="primary">+</v-btn>
</v-col>
<!-- column 3 -->
<v-col class="d-flex justify-center flex-0-1">
<v-btn color="secondary">Schließen</v-btn>
</v-col>
</v-row>
</v-container>
</v-app>
</template>
<script setup>
const length = 10 // Adjust for smaller/larger array
const dummy = [...Array(length).keys()]
</script>
<style scoped>
.full-height {
height: calc(100vh - 37px);
}
</style>