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

Select component defaults to 'Choose ...' when selected option is 0 #35

Open
brunoimbrizi opened this issue Mar 11, 2017 · 0 comments
Open

Comments

@brunoimbrizi
Copy link

Consider the example:

var obj = {
    select : ['Hello','you','may','choose','one','of','these','options']
};
var controlKit = new ControlKit();
controlKit.addPanel().addSelect(obj,'select',{
    selected : 2,
    onChange : function(index){
        console.log(index);
    }
});

This renders the component with the correct option 'may' pre-selected.

However, updating the selected property to:

    selected: 0

Results in the component being rendered with the default 'Choose ...' option.

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

1 participant