-
Notifications
You must be signed in to change notification settings - Fork 541
Maximum tags option for tags-input #24
Comments
Would be a cool feature. |
+1 On Monday, December 9, 2013, ludar wrote:
|
@richardwilly98 @ludar look at #40 |
I'm not quite sure how this feature should be implemented. I mean, I can think of two approaches:
The first approach is straightforward but doesn't provide the user with any feedback; she may not know at a glance why she can't add more tags. The second one aligns with Angular guidelines for "data-bound controls" and makes ngTagsInput similar to a regular input field. It also enables other validations, like making the element invalid when there's not enough tags or when there's some leftover text in the input box. But since this approach doesn't prevent the user from adding more tags than she should, it'll be up to the developer to come up with a feedback message based on the element status. I like the second approach better, but I'd like to hear from you guys. |
The second approach looks fine. |
I guess that disabling the input will prevent the user from removing/editing the last tag by pressing the backspace key, won't it? |
Agreed. But it's the simplest way. More complex would be to handle keypress and react only to backspace. It'll improve user experience. Thank you for mentioning that. |
Tags input could have a
max-tags
option in order to limit the number of tags that can be added.The text was updated successfully, but these errors were encountered: