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
The results converts to [object Object] under templateSelection #4438
Comments
Can you expand upon the issue you are facing by adding a few more pieces of information to your bug report?
The contributing guide contains a useful section with a few questions which can help us track down the bug and speed up the process of finding a fix for it. The creation of an isolated test case would also be useful. |
I have the same problem. this is my return JSON:
my templateSelection option is this one:
it's happening that my optionSelected being converted to [object Object] . I am unable to access internal items. The error does not happen in the templateResult option. the listing is displayed perfectly. |
someone? |
no one? |
I using the latest version of select2 library; however, I am having an issue which I believe it's a bug.
I am using Select2 in order to fetch some data from a rest api, until now everything is fine I can see the data that I want when searching; however when I click on that result using the below lines:
What I see is [object Object] knowing that 'results' is an array and 'results.Name' is a string, but when it goes under 'templateSelection' everything converts to [object Object]
For you notes, the same array works fine under 'templateResult', the issue is only in 'templateSelection'
Is anybody facing this issue too? Is this a bug? How can I solve it?
The text was updated successfully, but these errors were encountered: