Skip to content

Commit

Permalink
- FIX: Fixed tag autocomplete.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-raubach committed Sep 1, 2022
1 parent 57139e4 commit 8676643
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frickl",
"version": "2.0.1",
"version": "2.1.0",
"private": true,
"description": "Frickl is a self-hosted image library. This is the web interface of Frickl written in Vue.js.",
"author": "sebastian-raubach <[email protected]>",
Expand Down
7 changes: 6 additions & 1 deletion src/components/modals/AddTagModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<VueTagsInput
v-model="tempInput"
:tags="newTags"
:autocomplete-items="allTags"
:autocomplete-items="filteredItems"
placeholder="Enter tag names"
@tags-changed="addedTags => addTags(addedTags)"
ref="focusThis" />
Expand Down Expand Up @@ -50,6 +50,11 @@ export default {
components: {
VueTagsInput
},
computed: {
filteredItems: function () {
return this.allTags.filter(t => t.text.toLowerCase().includes(this.tempInput.toLowerCase()))
}
},
methods: {
addTags: function (addedTags) {
this.newTags = addedTags.map(t => {
Expand Down

0 comments on commit 8676643

Please sign in to comment.