1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

implement feature 'saveTagsAlphabeticall'

This commit is contained in:
vienai8d
2018-12-15 08:28:07 +09:00
parent 13c2f471aa
commit 6e8fe7308c

View File

@@ -45,8 +45,14 @@ class TagSelect extends React.Component {
value = _.isArray(value)
? value.slice()
: []
if (!_.includes(value, newTag)) {
value.push(newTag)
value = _.uniq(value)
}
if (this.props.saveTagsAlphabetically) {
value = _.sortBy(value)
}
this.setState({
newTag: ''