Skip to content

Commit

Permalink
fix(ui): error message in table row
Browse files Browse the repository at this point in the history
  • Loading branch information
18alantom committed Jul 18, 2022
1 parent 3717b7d commit 1265453
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/components/Controls/TableRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
px-2
border-b
hover:bg-gray-50
h-row-mid
group
flex
items-center
justify-center
h-row-mid
relative
"
>
<!-- Index or Remove button -->
Expand Down Expand Up @@ -52,8 +53,9 @@

<!-- Error Display -->
<div
class="text-sm text-red-600 mb-2 pl-2 col-span-full"
v-if="Object.values(errors).filter(Boolean).length"
class="text-xs text-red-600 pl-2 col-span-full absolute"
style="bottom: 0px"
v-if="hasErrors"
>
{{ getErrorString() }}
</div>
Expand Down Expand Up @@ -97,6 +99,11 @@ export default {
doc: this.row,
};
},
computed: {
hasErrors() {
return Object.values(this.errors).filter(Boolean).length;
},
},
methods: {
onChange(df, value) {
if (value == null) {
Expand Down

0 comments on commit 1265453

Please sign in to comment.