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

Toggle Component: defaultToggled not being set #102

Closed
sogoiii opened this issue Feb 23, 2017 · 2 comments
Closed

Toggle Component: defaultToggled not being set #102

sogoiii opened this issue Feb 23, 2017 · 2 comments

Comments

@sogoiii
Copy link
Contributor

sogoiii commented Feb 23, 2017

Expect: That when I set defaultToggled, the component should be in the on position per the properties

import { Field } from 'redux-form'
import { Toggle } from 'redux-form-material-ui'

export const Upload = (props) => (
<Field
  name='componentName'
  label='componentLabel'
  defaultToggled
  component={Toggle}
  />
)

Current: When defaultToggled set, the component is in the off position.

Version:
redux-form-material-ui --> 4.1.2
material-ui --> 0.17.0

@jmenglis
Copy link

jmenglis commented Mar 28, 2017

I'm not sure that the fix is delivering the proper expected result.

According to the material-ui it indicates that either toggled or defaultToggled should be used based on if the component is controlled or uncontrolled.

I am working on the putting together a pull request to adjust this. Probably should be passing an error/warning as well if they use both in a component.

@erikras
Copy link
Owner

erikras commented Mar 31, 2017

Fix published in v4.1.3.

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

3 participants