Skip to content
Discussion options

You must be logged in to vote

To make this work you currently also have to provide a custom template, which is rendering the labels and its integrated delete icon.
I have to admit, we should change the default template to make use of a classname setting instead of having this hardcoded. i think i'll prepare a PR to fix this.

So for now, please try

$("select[name='cores\[\]']").dropdown({
	allowAdditions:true,
	selector:{
		remove: '> .label > .icon-cancel.icon',		
	},
	templates: {
		label: function(value, text, preserveHTML) {
			var
				escape = $.fn.dropdown.settings.templates.escape;
			return escape(text,preserveHTML) + '<i class="icon-cancel icon"></i>';
		}
	}
});

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lubber-de
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #383 on October 06, 2020 19:45.