1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 18:26:26 +00:00

modify: remove add tag button

This commit is contained in:
sota1235
2016-12-22 14:00:44 +09:00
parent b6fc24c6e7
commit 1118149b9e

View File

@@ -9,7 +9,6 @@ class TagSelect extends React.Component {
this.state = { this.state = {
newTag: '', newTag: '',
inputReady: false,
} }
} }
@@ -77,7 +76,6 @@ class TagSelect extends React.Component {
newTag: '' newTag: ''
}, () => { }, () => {
this.value = value this.value = value
this.setState({ inputReady: false })
this.props.onChange() this.props.onChange()
}) })
} }
@@ -100,12 +98,6 @@ class TagSelect extends React.Component {
} }
} }
handleNewTagInputReady (e) {
this.setState({
inputReady: true,
})
}
render () { render () {
let { value, className } = this.props let { value, className } = this.props
@@ -134,9 +126,6 @@ class TagSelect extends React.Component {
styleName='root' styleName='root'
> >
{tagList} {tagList}
{(() => {
if (this.state.inputReady) {
return (
<input styleName='newTag' <input styleName='newTag'
ref='newTag' ref='newTag'
value={this.state.newTag} value={this.state.newTag}
@@ -144,17 +133,6 @@ class TagSelect extends React.Component {
onChange={(e) => this.handleNewTagInputChange(e)} onChange={(e) => this.handleNewTagInputChange(e)}
onKeyDown={(e) => this.handleNewTagInputKeyDown(e)} onKeyDown={(e) => this.handleNewTagInputKeyDown(e)}
/> />
)
}
return (
<button styleName='add-tag-button'
onClick={(e) => this.handleNewTagInputReady(e)}
>
<i className='fa fa-plus' />
</button>
)
})()}
</div> </div>
) )
} }