Skip to content

Commit 6e8fe73

Browse files
committed
implement feature 'saveTagsAlphabeticall'
1 parent 13c2f47 commit 6e8fe73

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

browser/main/Detail/TagSelect.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ class TagSelect extends React.Component {
4545
value = _.isArray(value)
4646
? value.slice()
4747
: []
48-
value.push(newTag)
49-
value = _.uniq(value)
48+
49+
if (!_.includes(value, newTag)) {
50+
value.push(newTag)
51+
}
52+
53+
if (this.props.saveTagsAlphabetically) {
54+
value = _.sortBy(value)
55+
}
5056

5157
this.setState({
5258
newTag: ''

0 commit comments

Comments
 (0)