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
Why restrict pushing strings? Why not push a "tag" object. All other attributes on the tag can remain the same, but when displaying it access the tags name field. For example, opposed to doing
tag = privateMethods.trimTag(tag, opts.delimiterChars);
Do this:
tag.name = privateMethods.trimTag(tag.name, opts.delimiterChars);
I know I would use this because usually a tag represents more than just a name. A tag might have an json associated with it for example. I'm using a modified version of this plugin on my site and the tags represent tag models in my database. These have more attributes than just a string: description, image, etc. This could be useful for web applications that associate tags with attributed data plus a name, not just a string.
The text was updated successfully, but these errors were encountered:
Hi guys, as I've said in other threads if someone can raise a PR for this we'll accept it. Now that we've switched to Twitter Typeahead it should be more easily achieved than when we were on the legacy Bootstrap Typeahead.
Why restrict pushing strings? Why not push a "tag" object. All other attributes on the tag can remain the same, but when displaying it access the tags name field. For example, opposed to doing
tag = privateMethods.trimTag(tag, opts.delimiterChars);
Do this:
tag.name = privateMethods.trimTag(tag.name, opts.delimiterChars);
I know I would use this because usually a tag represents more than just a name. A tag might have an json associated with it for example. I'm using a modified version of this plugin on my site and the tags represent tag models in my database. These have more attributes than just a string: description, image, etc. This could be useful for web applications that associate tags with attributed data plus a name, not just a string.
The text was updated successfully, but these errors were encountered: