Skip to content

Commit

Permalink
Fixed #43 & #62
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMordred committed Aug 4, 2019
1 parent f6f350f commit 215a561
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you're not using NPM, you can include the required files into your page manua

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.13/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@voerro/[email protected].1/dist/voerro-vue-tagsinput.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@voerro/[email protected].2/dist/voerro-vue-tagsinput.js"></script>

<script>
new Vue({
Expand All @@ -50,7 +50,7 @@ If you're not using NPM, you can include the required files into your page manua
Include the CSS file on your page to apply the styling. Read the `Styling` section to learn how to customize the appearance.

```
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@voerro/[email protected].1/dist/style.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@voerro/[email protected].2/dist/style.css">
```

**IMPORTANT:** Always grab the latest versions of the package from [JSDELIVR](https://www.jsdelivr.com/package/npm/@voerro/vue-tagsinput?path=dist), the ones provided in the examples above might be outdated. Same goes for Vue.js.
Expand Down Expand Up @@ -269,6 +269,11 @@ A pretty serious bug (#53) was fixed in `v2.0.0`. The data format for the `exist

## Changelog

#### v.2.0.2

- Fix: [#43](/voerro/vue-tagsinput/issues/43)
- Fix: [#62](/voerro/vue-tagsinput/issues/62)

#### v.2.0.1

- Fix: broken dropdown
Expand Down
2 changes: 1 addition & 1 deletion dist/voerro-vue-tagsinput.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/voerro-vue-tagsinput.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@voerro/vue-tagsinput",
"version": "2.0.1",
"version": "2.0.2",
"description": "A simple tags input with typeahead made with Vue.js 2",
"main": "src/main.js",
"keywords": [
Expand Down
16 changes: 10 additions & 6 deletions src/VoerroTagsInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export default {
? tag.value
: tag.value.toLowerCase();
if (searchQuery == compareable) {
if (searchQuery === compareable) {
newTag = Object.assign({}, tag);
break;
Expand Down Expand Up @@ -344,8 +344,10 @@ export default {
this.tags.push(tag);
// Emit events
this.$emit('tag-added', tag);
this.$emit('tags-updated');
this.$nextTick(() => {
this.$emit('tag-added', tag);
this.$emit('tags-updated');
});
}
},
Expand Down Expand Up @@ -376,8 +378,10 @@ export default {
this.tags.splice(index, 1);
// Emit events
this.$emit('tag-removed', tag);
this.$emit('tags-updated');
this.$nextTick(() => {
this.$emit('tag-removed', tag);
this.$emit('tags-updated');
});
},
/**
Expand Down Expand Up @@ -546,7 +550,7 @@ export default {
? selectedTag.value
: selectedTag.value.toLowerCase();
if (selectedTag.key == tag.key && compareable == searchQuery) {
if (selectedTag.key === tag.key && compareable.search(searchQuery) > -1) {
return true;
}
}
Expand Down

0 comments on commit 215a561

Please sign in to comment.