Replies: 1 comment 3 replies
-
Hi, Had the same issue. My solution:
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I checked this page: https://tom-select.js.org/docs/events/
And for example on
change
event, we have only thevalue
, not the complete item object.In the
item_add
, theitem
parameter returns the HTML tag of the item not the object.For ex debugging the
value
anditem
parameters looks like:Object:
The
on("item_add", function (value, item)
returns:584215 <div data-value="584215" class="item" data-ts-item>Suggestion 5
Is it normal and is it possible to improve it? If we want to get the selected items label (text), how we can do it?
I don't want to do a dirty code by removing the HTML code from item and keep only the text 😅
Beta Was this translation helpful? Give feedback.
All reactions