Permalink
Browse files

fix(form-group): Not applying label-for prop value (#1000)

  • Loading branch information...
tmorehouse committed Sep 6, 2017
1 parent dcc7504 commit 56a4e5ed4430da89af27456512eb7ddd2d42d3e9
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/components/form-group.vue
@@ -186,7 +186,7 @@
updateTargetId() {
if (this.labelFor) {
// User supplied for target
return this.labelFor;
this.targetId = this.labelFor;
}
// Else find first input with ID
const content = this.$refs.content;
@@ -199,6 +199,7 @@
}
},
mounted() {
this.targetId = this.labelFor || null;
// We run in nextTick to ensure auto IDs are available
this.$nextTick(() => this.updateTargetId());
},

0 comments on commit 56a4e5e

Please sign in to comment.