@yaireo/tagify
Advanced tools
Comparing version 2.7.5 to 2.7.6
@@ -10,2 +10,3 @@ // import React from 'react'; | ||
this.state = {}; | ||
this._handleRef = this._handleRef.bind(this); | ||
} | ||
@@ -15,7 +16,2 @@ | ||
this.tagify = new Tagify(this.component, this.props.settings || {}); | ||
// this.tagify.on('add', onAddTag) | ||
// .on('remove', onRemoveTag) | ||
// .on('input', onInput) | ||
// .on('invalid', onInvalidTag); | ||
} | ||
@@ -33,10 +29,10 @@ | ||
} | ||
_handleRef(component){ | ||
this.component = component; | ||
} | ||
render(){ | ||
const attrs = { | ||
ref : this._handleRef.bind(this), | ||
ref : this._handleRef, | ||
name : this.props.name, | ||
@@ -48,7 +44,6 @@ className : this.props.className, | ||
if( this.props.mode === 'textarea' ) | ||
return <textarea {...attrs} defaultValue={this.props.initialValue}></textarea> | ||
return <input {...attrs} defaultValue={this.props.initialValue} /> | ||
return this.props.mode === 'textarea' ? | ||
<textarea {...attrs} defaultValue={this.props.initialValue}></textarea> : | ||
<input {...attrs} defaultValue={this.props.initialValue} /> | ||
} | ||
} |
{ | ||
"name": "@yaireo/tagify", | ||
"version": "2.7.5", | ||
"version": "2.7.6", | ||
"homepage": "https://github.com/yairEO/tagify", | ||
@@ -5,0 +5,0 @@ "description": "Convert an input field into a Tags element. Easy, customizable, with good performance and small code footprint.", |
@@ -237,3 +237,5 @@ [Tagify](https://yaireo.github.io/tagify) - lightweight input "tags" script | ||
[Live React Demo in Codepen](https://codepen.io/vsync/project/editor/44cc53af79bbede42efd7521d94d6f9f) | ||
### jQuery version | ||
@@ -240,0 +242,0 @@ |
299
383700
3153