Skip to content

Commit 56a4e5e

Browse files
authored
fix(form-group): Not applying label-for prop value (bootstrap-vue#1000)
1 parent dcc7504 commit 56a4e5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/components/form-group.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
updateTargetId() {
187187
if (this.labelFor) {
188188
// User supplied for target
189-
return this.labelFor;
189+
this.targetId = this.labelFor;
190190
}
191191
// Else find first input with ID
192192
const content = this.$refs.content;
@@ -199,6 +199,7 @@
199199
}
200200
},
201201
mounted() {
202+
this.targetId = this.labelFor || null;
202203
// We run in nextTick to ensure auto IDs are available
203204
this.$nextTick(() => this.updateTargetId());
204205
},

0 commit comments

Comments
 (0)