cwhatley / material-ui-react-jsonschema-form

Customizations of react-jsonschema-form for use in material-ui/react app.
Apache License 2.0
8 stars 2 forks source link

Bug Fixes: RadioGroup inline & readonly for textfield #15

Closed jagribble closed 5 years ago

jagribble commented 5 years ago

I noticed that the application of the inline style for radio group was broken using:

 "numberEnumRadio": {
    "ui:widget": "radio",
    "ui:options": {
      "inline": true
    }
  },

Have fixed this by checking the

const row = options ? options.inline : false;

The schema prop was holding the readOnly property so was not getting passed through too the component properly.

I have also changed the imports to material-ui to import the single assets being used. In my experience this greatly reduces the file size as importing the named exports like it was imports the only of @material-ui/core

// old 
import { Button } from '@material-ui/core'
// changed to
import Button from '@material-ui/core/Button'
jagribble commented 5 years ago

@cwhatley hope this looks ok. Great work on the rest of this. When are you planning on publishing?

cwhatley commented 5 years ago

Thanks! Great changes here.

Re: publishing, I was holding out for time to sync up with the latest of the base project before publishing. Hope to get to it soon.

jagribble commented 5 years ago

Thanks! Great changes here.

Re: publishing, I was holding out for time to sync up with the latest of the base project before publishing. Hope to get to it soon.

That’s fair enough. I’ll have a look to see if I can help out with that! It’s a great package so would be great to be published