mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
implement feature 'saveTagsAlphabeticall'
This commit is contained in:
@@ -45,8 +45,14 @@ class TagSelect extends React.Component {
|
|||||||
value = _.isArray(value)
|
value = _.isArray(value)
|
||||||
? value.slice()
|
? value.slice()
|
||||||
: []
|
: []
|
||||||
value.push(newTag)
|
|
||||||
value = _.uniq(value)
|
if (!_.includes(value, newTag)) {
|
||||||
|
value.push(newTag)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.props.saveTagsAlphabetically) {
|
||||||
|
value = _.sortBy(value)
|
||||||
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
newTag: ''
|
newTag: ''
|
||||||
|
|||||||
Reference in New Issue
Block a user