Skip to content

Commit 3fb961a

Browse files
madassdevJhumanJ
andauthored
fix matrix input (#556)
* fix matrix input * Fix matrix responsiveness --------- Co-authored-by: Julien Nahum <julien@nahum.net>
1 parent f334a26 commit 3fb961a

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

client/components/forms/MatrixInput.vue

+8-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<slot name="label" />
55
</template>
66
<div
7-
class="border border-gray-300"
7+
class="border border-gray-300 overflow-x-auto"
88
:class="[
99
theme.default.borderRadius,
1010
{
@@ -13,18 +13,16 @@
1313
},
1414
]"
1515
>
16-
<table
17-
class="w-full table-fixed overflow-hidden"
18-
>
16+
<table class="w-full table-auto">
1917
<thead class="">
2018
<tr>
21-
<th />
19+
<th class="text-left p-2 w-auto max-w-xs" />
2220
<td
2321
v-for="column in columns"
2422
:key="column"
25-
class="border-l border-gray-300"
23+
class="border-l border-gray-300 max-w-24 overflow-hidden"
2624
>
27-
<div class="p-2 w-full flex items-center justify-center capitalize text-sm truncate">
25+
<div class="p-2 w-full flex items-center justify-center text-sm">
2826
{{ column }}
2927
</div>
3028
</td>
@@ -37,8 +35,8 @@
3735
:key="rowIndex"
3836
class="border-t border-gray-300"
3937
>
40-
<td>
41-
<div class="w-full flex-grow p-2 text-sm truncate">
38+
<td class="text-left w-auto max-w-24 overflow-hidden">
39+
<div class="w-full p-2 text-sm">
4240
{{ row }}
4341
</div>
4442
</td>
@@ -103,7 +101,7 @@ export default {
103101
}
104102
},
105103
computed: {},
106-
beforeMount() {
104+
mounted() {
107105
if (!this.compVal || typeof this.compVal !== 'object') {
108106
this.compVal = {}
109107
}

0 commit comments

Comments
 (0)