You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to me that once the tags length is equal to the maxTags prop, the input should no longer be shown. It gives the user the false sense that they can continue to add more tags since the placeholder is shown and they can type into the field.
I saw this issue resolved about hiding the placeholder, but it doesn't address the user's ability to type a new tag: #21
It seems like a simple fix by just adding the below v-show on the input tag in vue-tags-input.vue.
v-show="maxTags > tags.length"
I can create a pull request.
The text was updated successfully, but these errors were encountered:
By hiding the input field when maxTags is reached, you disallow to react when the end-user is trying to add a new tag:
watch: {// Listen to the input fieldquery: 'refreshSuggestions',},methods: {asyncrefreshSuggestions(){if(this.maxTags>0&&this.tags.length>=this.maxTags){// *** With #116 , the following code will never be executed// Delete the input fieldthis.query='';// Display a warning message to the end-user in the suggestion listthis.suggestedTags=createTags([`${this.maxTags} tags max`]);// ... but it could have been a flash message or what you want// that informs the end-user the max number of tags has been reached. }else{this.suggestedTags=awaitthis.search(this.query);}},// ...},
So, a compromise should be to enable this behavior with a boolean prop (e.g. hide-input-on-max-tags).
What do you thing about adding this prop to your PR?
It seems to me that once the tags length is equal to the maxTags prop, the input should no longer be shown. It gives the user the false sense that they can continue to add more tags since the placeholder is shown and they can type into the field.
I saw this issue resolved about hiding the placeholder, but it doesn't address the user's ability to type a new tag: #21
It seems like a simple fix by just adding the below v-show on the input tag in vue-tags-input.vue.
v-show="maxTags > tags.length"
I can create a pull request.
The text was updated successfully, but these errors were encountered: