Merge pull request #36 from liady/gh-pages-htmlfor

support "for" attribute in react templates
This commit is contained in:
Ido 2015-04-29 16:47:06 +03:00
commit dbec6dc6b1
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ var reactSupportedAttributes = ['accept', 'acceptCharset', 'accessKey', 'action'
'max', 'maxLength', 'media', 'mediaGroup', 'method', 'min', 'multiple', 'muted', 'name', 'noValidate', 'open', 'pattern', 'placeholder', 'poster', 'preload', 'radioGroup', 'readOnly', 'rel',
'required', 'role', 'rows', 'rowSpan', 'sandbox', 'scope', 'scrolling', 'seamless', 'selected', 'shape', 'size', 'sizes', 'span', 'spellCheck', 'src', 'srcDoc', 'srcSet', 'start', 'step',
'style', 'tabIndex', 'target', 'title', 'type', 'useMap', 'value', 'width', 'wmode'];
var attributesMapping = {'class': 'className', 'rt-class': 'className'};
var attributesMapping = {'class': 'className', 'rt-class': 'className', 'for': 'htmlFor'};
_.forEach(reactSupportedAttributes, function (attributeReactName) {
if (attributeReactName !== attributeReactName.toLowerCase()) {
attributesMapping[attributeReactName.toLowerCase()] = attributeReactName;