Skip to content

Need original classes from Option #40

Answered by oyejorge
TheoLyn69 asked this question in Q&A
Discussion options

You must be logged in to vote

Alright, this can be done now with v1.4 like so:

new TomSelect("#select-beast",{
	render: {
		option: function(data, escape) {
			return '<div class="' +escape(data.$option.className) +'">' + escape(data.text) + '</div>';
		},
	}
});

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@TheoLyn69
Comment options

@oyejorge
Comment options

@TheoLyn69
Comment options

Comment options

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

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