Merge pull request #2271 from nextcloud/fix/sortFilterTags
sort tags in filter
This commit is contained in:
@@ -46,10 +46,10 @@
|
||||
<span class="hidden-visually">{{ t('deck', 'Tags') }}</span>
|
||||
</div>
|
||||
<div class="section-details">
|
||||
<Multiselect v-model="allLabels"
|
||||
<Multiselect v-model="assignedLabels"
|
||||
:multiple="true"
|
||||
:disabled="!canEdit"
|
||||
:options="currentBoard.labels"
|
||||
:options="labelsSorted"
|
||||
:placeholder="t('deck', 'Assign a tag to this card…')"
|
||||
:taggable="true"
|
||||
label="title"
|
||||
@@ -266,7 +266,7 @@ export default {
|
||||
assignedUsers: null,
|
||||
addedLabelToCard: null,
|
||||
copiedCard: null,
|
||||
allLabels: null,
|
||||
assignedLabels: null,
|
||||
locale: getLocale(),
|
||||
|
||||
saving: false,
|
||||
@@ -370,6 +370,9 @@ export default {
|
||||
renderedDescription() {
|
||||
return markdownIt.render(this.copiedCard.description || '')
|
||||
},
|
||||
labelsSorted() {
|
||||
return [...this.currentBoard.labels].sort((a, b) => (a.title < b.title) ? -1 : 1)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentCard() {
|
||||
@@ -390,7 +393,7 @@ export default {
|
||||
}
|
||||
|
||||
this.copiedCard = JSON.parse(JSON.stringify(this.currentCard))
|
||||
this.allLabels = this.currentCard.labels
|
||||
this.assignedLabels = [...this.currentCard.labels].sort((a, b) => (a.title < b.title) ? -1 : 1)
|
||||
|
||||
if (this.currentCard.assignedUsers && this.currentCard.assignedUsers.length > 0) {
|
||||
this.assignedUsers = this.currentCard.assignedUsers.map((item) => ({
|
||||
|
||||
Reference in New Issue
Block a user