Skip to content

Commit

Permalink
fix: vertical scrolling (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomarr authored Oct 22, 2024
1 parent 3a74eea commit 32b5f26
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/DataTable/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div ref="table" class="flex flex-col gap-y-2 sm:gap-y-2 relative">
<div ref="table" class="flex h-full flex-col gap-y-2 sm:gap-y-2 relative">
<div v-if="search" class="search-wrapper">
<Input v-model="searchModel" placeholder="Search" />
<!-- Display filters -->
Expand Down Expand Up @@ -35,10 +35,12 @@
>
<div
v-bind="options.isVirtualised ? wrapperProps : {}"
:class="[
options.isVirtualised ? 'h-full flex' : 'w-full',
options.firstColumnSticky && 'flex',
]"
class="h-full"
:class="
options.isVirtualised || options.firstColumnSticky
? 'flex'
: 'w-full'
"
>
<div
v-if="options.firstColumnSticky"
Expand Down Expand Up @@ -173,7 +175,7 @@
</div>
<div
ref="tableWrapper"
class="rows-wrapper flex flex-col flex-1"
class="rows-wrapper h-full flex flex-col flex-1"
:class="options.firstColumnSticky && 'h-max'"
>
<div
Expand Down

0 comments on commit 32b5f26

Please sign in to comment.