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

Change the default type of id from string to any #89

Open
pralhadstha opened this issue Jul 3, 2017 · 3 comments
Open

Change the default type of id from string to any #89

pralhadstha opened this issue Jul 3, 2017 · 3 comments

Comments

@pralhadstha
Copy link

pralhadstha commented Jul 3, 2017

As i can see the select2 will only take two value from us:

  1. id => string
  2. text => string

Can we change the default property of id to take number too. As the original select2 can work with either any unique value. Here we are enforced to use the string for id. If it could take the number, we could add the unique id as number for the option too.

@Dhamu143
Copy link

can we use this for update form. i mean i need to display some specific value its not working with startValue=32 . everytime it displays first element of array

@pralhadstha
Copy link
Author

@Dhamu143 you need to give the default value to the select2 selector.

like:

<select2 [data]="exampleData" [value]="defaultValue"></select2>

@Dhamu143
Copy link

Dhamu143 commented Apr 3, 2018

please check this what I want to ask.
#120
help me if you can.thanks

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