-
Notifications
You must be signed in to change notification settings - Fork 97
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
How to use options with key of arrays. #95
Comments
I have the same problem as I need to pass key value pairs to options. |
You can use this function |
@ArnaudRinquin I am curious why can't I accept array objects like this
|
@giantss If you want to pass an array of objects, you have to add this code |
As per your example
const options = [
'Option 1',
'Option 2'
];
const options = [
{id:1, answer: 'Option 1'},
{id: 2, answer: 'Option 2'}
];
In this case I get selected value as false in renderOption. How to get selected value for the above set of options.
The text was updated successfully, but these errors were encountered: