Use 100dvh to fix layout issue in mobile devices
This commit is contained in:
committed by
Aditya Chandel
parent
de005398df
commit
fe2d307d2a
@@ -12,7 +12,7 @@
|
||||
|
||||
.virtual-scroller {
|
||||
width: 100%;
|
||||
height: calc(100vh - 10.9rem);
|
||||
height: calc(100dvh - 10.9rem);
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="h-[calc(100vh-6.1rem)] rounded-xl bg-[var(--card-background)] flex flex-col">
|
||||
<div class="h-[calc(100dvh-6.1rem)] rounded-xl bg-[var(--card-background)] flex flex-col">
|
||||
|
||||
<div class="flex items-center justify-between px-4 py-4">
|
||||
<span class="text font-semibold">Filter Mode</span>
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
showGridlines
|
||||
stripedRows
|
||||
[scrollable]="true"
|
||||
[scrollHeight]="'calc(100vh - 160px)'"
|
||||
[scrollHeight]="'calc(100dvh - 160px)'"
|
||||
[virtualScroll]="true"
|
||||
[virtualScrollItemSize]="46"
|
||||
[(selection)]="selectedBooks"
|
||||
|
||||
@@ -84,7 +84,7 @@ export class BookTableComponent implements OnInit, OnDestroy, OnChanges {
|
||||
ngOnChanges() {
|
||||
const wrapperElements: HTMLCollection = document.getElementsByClassName('p-virtualscroller');
|
||||
Array.prototype.forEach.call(wrapperElements, function (wrapperElement) {
|
||||
wrapperElement.style["height"] = 'calc(100vh - 160px)';
|
||||
wrapperElement.style["height"] = 'calc(100dvh - 160px)';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
box-sizing: border-box;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
.epub-viewer-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user