1.2.3 • Published 2 years ago

rhfa-material-ui v1.2.3

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

rhfa-material-ui

This library allows your React application to automatically generate forms using ReactHookForm and rendering by Material-UI. The form and validations are generated following a schema inspired by SimpleSchema.

Play with the demo

Breaking changes

After version 1.1.0 you have to install material-ui in your project:

$ npm install @material-ui/core @material-ui/icons --save

Installation

$ npm install react-hook-form rhfa-material-ui @material-ui/core @material-ui/icons --save

Usage

Just like react-hook-form-auto except you import rhfa-material-ui:

    import { createSchema, Autoform } from 'rhfa-material-ui'

    export const client = createSchema('client', {
      name: {
        type: 'string',
        required: true,
        max: 32
      },
      age: {
        type: 'number'
      }
    })

    const MyForm = ({ onSubmit }) =>
      <Autoform
        schema={client}
        onSubmit={onSubmit}
      />

Documentation

1.2.3

2 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago