1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-18 20:21:44 +00:00

change folder

This commit is contained in:
Dick Choi
2016-07-21 23:44:00 +09:00
parent 3882df41f1
commit a6e3dbd825
6 changed files with 118 additions and 20 deletions

View File

@@ -166,20 +166,20 @@ class FolderSelect extends React.Component {
}
}
handleOptionClick (folderKey) {
handleOptionClick (storageKey, folderKey) {
return (e) => {
e.stopPropagation()
this.setState({
status: 'FOCUS'
}, () => {
this.setValue(folderKey)
this.setValue(storageKey + '-' + folderKey)
this.refs.root.focus()
})
}
}
setValue (folderKey) {
this.value = folderKey
setValue (value) {
this.value = value
this.props.onChange()
}
@@ -208,7 +208,7 @@ class FolderSelect extends React.Component {
: 'search-optionList-item'
}
key={option.storage.key + '-' + option.folder.key}
onClick={(e) => this.handleOptionClick(option.folder.key)(e)}
onClick={(e) => this.handleOptionClick(option.storage.key, option.folder.key)(e)}
>
<span styleName='search-optionList-item-name'
style={{borderColor: option.folder.color}}