Skip to content

Commit

Permalink
fix matrix input (#556)
Browse files Browse the repository at this point in the history
* fix matrix input

* Fix matrix responsiveness

---------

Co-authored-by: Julien Nahum <[email protected]>
  • Loading branch information
madassdev and JhumanJ authored Sep 4, 2024
1 parent f334a26 commit 3fb961a
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions client/components/forms/MatrixInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<slot name="label" />
</template>
<div
class="border border-gray-300"
class="border border-gray-300 overflow-x-auto"
:class="[
theme.default.borderRadius,
{
Expand All @@ -13,18 +13,16 @@
},
]"
>
<table
class="w-full table-fixed overflow-hidden"
>
<table class="w-full table-auto">
<thead class="">
<tr>
<th />
<th class="text-left p-2 w-auto max-w-xs" />
<td
v-for="column in columns"
:key="column"
class="border-l border-gray-300"
class="border-l border-gray-300 max-w-24 overflow-hidden"
>
<div class="p-2 w-full flex items-center justify-center capitalize text-sm truncate">
<div class="p-2 w-full flex items-center justify-center text-sm">
{{ column }}
</div>
</td>
Expand All @@ -37,8 +35,8 @@
:key="rowIndex"
class="border-t border-gray-300"
>
<td>
<div class="w-full flex-grow p-2 text-sm truncate">
<td class="text-left w-auto max-w-24 overflow-hidden">
<div class="w-full p-2 text-sm">
{{ row }}
</div>
</td>
Expand Down Expand Up @@ -103,7 +101,7 @@ export default {
}
},
computed: {},
beforeMount() {
mounted() {
if (!this.compVal || typeof this.compVal !== 'object') {
this.compVal = {}
}
Expand Down

0 comments on commit 3fb961a

Please sign in to comment.