Skip to content

Commit

Permalink
fix: data table horizontal scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikmehinagic committed Sep 29, 2023
1 parent b73587d commit d09f3c4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/DataTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
:style="{
gridTemplateColumns: sizes,
}"
:class="headerClass"
:class="[headerClass, horizontalScroll ? 'w-max' : '']"
>
<div class="checkbox">
<Checkbox
Expand Down Expand Up @@ -83,9 +83,7 @@
class="overflow-y-auto scrollable-content"
:class="[
sortedData.length ? '' : 'datatable-grid-rows-empty',
horizontalScroll
? 'w-[max-content] overflow-x-hidden'
: 'overflow-x-auto',
horizontalScroll ? 'w-max overflow-x-hidden' : 'overflow-x-auto',
]"
>
<!-- Rows -->
Expand Down

0 comments on commit d09f3c4

Please sign in to comment.