Skip to content

Commit 1118149

Browse files
committed
modify: remove add tag button
1 parent b6fc24c commit 1118149

1 file changed

Lines changed: 7 additions & 29 deletions

File tree

browser/main/Detail/TagSelect.js

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class TagSelect extends React.Component {
99

1010
this.state = {
1111
newTag: '',
12-
inputReady: false,
1312
}
1413
}
1514

@@ -77,7 +76,6 @@ class TagSelect extends React.Component {
7776
newTag: ''
7877
}, () => {
7978
this.value = value
80-
this.setState({ inputReady: false })
8179
this.props.onChange()
8280
})
8381
}
@@ -100,12 +98,6 @@ class TagSelect extends React.Component {
10098
}
10199
}
102100

103-
handleNewTagInputReady (e) {
104-
this.setState({
105-
inputReady: true,
106-
})
107-
}
108-
109101
render () {
110102
let { value, className } = this.props
111103

@@ -134,27 +126,13 @@ class TagSelect extends React.Component {
134126
styleName='root'
135127
>
136128
{tagList}
137-
{(() => {
138-
if (this.state.inputReady) {
139-
return (
140-
<input styleName='newTag'
141-
ref='newTag'
142-
value={this.state.newTag}
143-
placeholder='Add tag...'
144-
onChange={(e) => this.handleNewTagInputChange(e)}
145-
onKeyDown={(e) => this.handleNewTagInputKeyDown(e)}
146-
/>
147-
)
148-
}
149-
150-
return (
151-
<button styleName='add-tag-button'
152-
onClick={(e) => this.handleNewTagInputReady(e)}
153-
>
154-
<i className='fa fa-plus' />
155-
</button>
156-
)
157-
})()}
129+
<input styleName='newTag'
130+
ref='newTag'
131+
value={this.state.newTag}
132+
placeholder='Add tag...'
133+
onChange={(e) => this.handleNewTagInputChange(e)}
134+
onKeyDown={(e) => this.handleNewTagInputKeyDown(e)}
135+
/>
158136
</div>
159137
)
160138
}

0 commit comments

Comments
 (0)