Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery object not supported as templateSelection - Displays as [object Object] #31

Open
uturnr opened this issue Aug 26, 2019 · 1 comment

Comments

@uturnr
Copy link

uturnr commented Aug 26, 2019

The current version of select2 supports jQuery objects in both templateResult and templateSelection. The current version of selectWoo only supports them for templateResult.

This is how my selected template appears when I use a jQuery object in selectWoo:

Screen Shot 2019-08-26 at 12 22 11 PM

SingleSelection.prototype.update is different in the current version of select2, and in particular, changing:

$rendered.empty().text(formatted);

to:

$rendered.empty().append(formatted);

would add support for jQuery objects.

@fabianmarz
Copy link

Please see my comment in #39.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants