-
Notifications
You must be signed in to change notification settings - Fork 109
Feature request: receive the full "tag" object instead of either the tag value or label #41
Comments
Actually that is the way that the function works now! You will receive an object for that param that looks something like
|
Awesome, I'll check it out! Thanks. |
I just checked, but when I remove a tag, null is passed as the 3rd argument. Looking at the invoking code in the _popTag function, it makes sense: this.options.tagsChanged(tag.value || tag.label, 'popped', null); null is explicitly passed. |
There we go, just updated it so it passes the tag through (a8bed19). I guess I did it because in the tag object there is also the index of the tag, and the actual element, both of which make no sense once the tag has been removed, but I guess people can just ignore those. |
Yeah that makes sense. The reason I need the tag object is to update other elements on the screen that are related to the tag being removed. Thanks for the quick response. |
All good, I try :) btw, out of curiosity, what version are you using? the ThemeRoller version or the non-ThemeRoller version? |
Excellent :) Currently I'm using the non-ThemeRoller one, since the default style is perfect for my needs (I manually changed some colors and borders). It's also the first time I used this (rather awesome) plugin, it's being used for the next version of the Orchard Taxonomies module. |
The "tagsChanged" event passes either the tag's value (if available) or the tag's label. In my use case this is somewhat bothersome, because when the user adds a tag that is not yet part of the tag source, I receive a label. If the tag is already part of the tag source, I receive its value. As far as I know there is no easy way to know wether I receive a value or a label. So perhaps it would be good to receive the full tag object as a third parameter? E.g.
The text was updated successfully, but these errors were encountered: