Redux-form-material-ui: Not working with @material-ui/core v1.0.0

Created on 15 May 2018  Â·  29Comments  Â·  Source: erikras/redux-form-material-ui

Hello,
I think there is a problem with the recent v1.0.0-rc.0, which renames the namespace from material-ui to @material-ui/core.
I didn't follow the discussion so I cannot really say why this was made, but it broke this library.
Do you plan to update it to support v1.0.0-rc.0?
Will you release a final version once v1.0.0 is final as well?

Thanks!

Most helpful comment

I believe PR #249 is ready to go, just need somebody with write permissions to approve it.

All 29 comments

I know +1 is enough, but right now it's very important to upgrade so please update with next beta and @material-ui/core. A lot of people use it.

@erikras Do you maintain this repo? Will you make changes to support Material-UI v1+? Will you accept PR to support Material-UI v1+

I did required changes locally to not wait for this, could submit a PR as well.

any solutions for this ??

But with upgrade only MUI v1.0 RC.0 and further will be supported, no backwards compatibility because imports (and NPM module) were changed.

@erikras @mihirsoni I just submitted a pull request to fix this issue.
Would you please review, merge and release an updated package if it is ok?
Thanks!

I forked from the 5.0 branch, and tried to keep the syntax changes to a minimum (as compared to @andreapier 's PR #248 )

There is still some odd issue that I don't quite understand when testing the RadioGroup component.

@see #249

I had a quick look at your PR, I hope you are fine with this.

Maybe this could be the cause of your issues:
File src/__tests__/RadioGroup.spec.js
import { RadioGroup } from '@material-ui/core/Radio' should be import RadioGroup from '@material-ui/core/RadioGroup'

Also, I cannot see changes in example folder. Is this intentional?

Ah sharp eye @andreapier, thanks for reviewing! I have pushed a few more commits to fix that path, and I took a stab at updating the /examples/ but it looks like it still needs some attention to get back in working order, the form fields are updating the JSON output, but the labels and stuff are broken. I'll try to spend some time on it tomorrow and polish up the pull-request.

The mapError from PR by @andreapier works incorrectly, shows errors before touch/submit. Without any changes error messages aren't shown.
Suggesting:

const mapError = ({
  meta: { touched, error, warning } = {},
  input,
  ...props
}) => {
  const hasError = touched && (error || warning);
  const errorText = error || warning;
  const errorProps =
    hasError
      ? {
        ...props,
        ...input,
        error: Boolean(errorText)
      }
      : { ...input, ...props };

  if (hasError) {
    errorProps.helperText = errorText;
  }

  return errorProps;
};

+1, i just updated my app ui to material-ui v1.0.0. I would appreciate a lot if this would get the resource update. 10x.

Me also. Is there anything left to do, or are we just waiting for the pull request?

I believe PR #249 is ready to go, just need somebody with write permissions to approve it.

@travomic I hope you don't get offended but I think your PR is not ready at all.
Actually, I tested it because I wanted to see how you made it work with so few changes compared to mine, and I wasn't able to get the example working.
For example, if I click on the Selectelement I get an error.
I suspect this is because material-ui v1 dropped support for react v15. We must now use react v16, but I can't see this change in your PR.
Can you please tell how you tested your changes?

edit: Just committed a fix for @z-ax bug... thanks for the review!

@andreapier Also, instead of rc can we just use this with 1.0 ?

Sure! I literally just pushed to update to v1.0.0 final :)

@andreapier Perhaps my testing is overly naive… I had only started my fork from the 5.0 branch, and then used: yarn test after making my changes. It shows 28 passing, and no failures. Then I got the /example/ index page running, and my basic user testing seemed fine.

Is this going to be merged anytime soon? My dev. app was just broken as well by the update to v1.0.0

@travomic Maybe you will fork this project and publish new npm package with v1.0 support? Looks like the author don't care about this project anymore.

I no longer maintain this repo. @mihirsoni does.

If he has dropped the ball and someone else would like to be made a maintainer (such power comes with responsibility!), please let me know. Preferably also @ me on twitter to draw my attention.

I have published new version on next, if no issues found will move this changes to master.

Closing this.

Nice job, @mihirsoni.

Just wanted to report my experience until now with v5.0.0-beta.3.
I was able to migrate my app to @material-ui/core v1.0.0 (and to v1.1.0 which has been release in the meantime) and am experiencing no issues at the moment.
In the next few days I am going to do more testing. Will report again after that.
Thanks for the new release!

Why Beta 3 is not in releases yet?

@z-ax beta-3 was released a few days ago

@andreapier appreciate your efforts. I'll wait for next weekend to get it merged as master branch and will move it out of beta release. and we'll no longer support MUI 0.x

@z-ax look on npm

@z-ax Thanks for letting me know, it was in draft version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dealvz picture dealvz  Â·  4Comments

jampy picture jampy  Â·  6Comments

VasilyShelkov picture VasilyShelkov  Â·  4Comments

bertdeterd picture bertdeterd  Â·  3Comments

EssamTarik picture EssamTarik  Â·  3Comments