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

Allow 'disabled' property to be toggled #14

Merged
merged 1 commit into from
Aug 25, 2015

Conversation

netsgnut
Copy link
Contributor

Currently code like the following won't really work:

<Multiselect disabled={ this.state.shouldBeDisabled } />

The reason is that the disabled property has not been translated accordingly for the bootstrap-multiselect plugin to work upon. This PR listens to prop change and call the .multiselect('enable') and .multiselect('disable') accordingly.

Not sure if this is the right pattern to go - I am still getting used to React's pattern. Please feel free to test as well. Thanks.

@skratchdot
Copy link
Owner

Looks good to me. Thanks for this fix.

skratchdot added a commit that referenced this pull request Aug 25, 2015
Allow 'disabled' property to be toggled
@skratchdot skratchdot merged commit f797be6 into skratchdot:master Aug 25, 2015
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

Successfully merging this pull request may close these issues.

2 participants