Skip to content

Reinitialized tom select using class name #378

Answered by vaniarizki
vaniarizki asked this question in Q&A
Discussion options

You must be logged in to vote

I've found the solution.

for my case it's:
document.querySelectorAll('.select').forEach((el)=>{ if (el.tomselect) { let control = el.tomselect; control.destroy(); } let settings = {}; new TomSelect(el,settings); });

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
1 reply
@vaniarizki
Comment options

Comment options

You must be logged in to vote
10 replies
@vaniarizki
Comment options

@gkaft
Comment options

@vaniarizki
Comment options

@gkaft
Comment options

@vaniarizki
Comment options

Answer selected by vaniarizki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants