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

Id is being display if type is string #23

Closed
rexghadaffi opened this issue Apr 8, 2016 · 2 comments
Closed

Id is being display if type is string #23

rexghadaffi opened this issue Apr 8, 2016 · 2 comments

Comments

@rexghadaffi
Copy link

if the optionList of the select2 is like below / in the example you have given, it works fine.
var optionsList = [{ id: 1, text: 'first' }, { id: 1, text: 'second' }];

but not with this. it displays the id instead of the text.

  var optionsList = [
                      {
                          id: "ab703c8d-57e7-e511-80d1-00155d010e2c", text: "Mirage"
                      }, {
                          id: "ab499fa1-69c5-e511-80cc-00155d010e2c", text: "Sample Base Model"
                      }
      ]
@rexghadaffi
Copy link
Author

try editing your :jsfiddle

@trebuchetty
Copy link
Owner

This is an issue (not really an issue) with the customDropdownRenderer I made for the sample. The select2Editor still functions as it should.
In the renderer, you can remove the parseInt and change "===" to "==" and it will work as you wanted it to.

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