Skip to content

Commit

Permalink
Rebuild release.
Browse files Browse the repository at this point in the history
  • Loading branch information
twisty committed Nov 2, 2015
1 parent 5830edc commit 776491a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions release/mixins/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ module.exports = {
return hash;
},

/**
* getId
*
* The ID is used as an attribute on the form control, and is used to allow
* associating the label element with the form control.
*
* If we don't explicitly pass an `id` prop, we generate one based on the
* `name` property and a hash of the component props.
*/
getId: function getId() {
return this.props.id || this.props.name.split('[').join('_').replace(']', '') + this.hashString(JSON.stringify(this.props));
},
Expand Down

0 comments on commit 776491a

Please sign in to comment.