File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ const shouldHaveLabel = computed(() => {
45
45
</script >
46
46
47
47
<template >
48
- <div class =" form-group" >
48
+ <div class =" form-group" :style = " {display: fieldComponent && !fieldComponent.isVisible ? 'none': ''} " >
49
49
<label v-if =" shouldHaveLabel" :for =" fieldId" >
50
50
<span > {{ props.field.label }}</span >
51
51
</label >
Original file line number Diff line number Diff line change @@ -198,6 +198,14 @@ export default {
198
198
return this . model [ this . field . model ]
199
199
} ,
200
200
201
+ /**
202
+ * Compute the state of visibility of the field/input component. `this.field.visible` must be set for this to work,
203
+ * otherwise this will always return true.
204
+ */
205
+ isVisible ( ) {
206
+ return this . determineDynamicAttribute ( 'visible' , true )
207
+ } ,
208
+
201
209
/**
202
210
* Compute the disabled state of the field/input component. `this.field.disabled` must be set for this to work,
203
211
* otherwise this will always return false.
You can’t perform that action at this time.
0 commit comments