formsy-material-ui
This library is a wrapper for Material-UI form components to allow them to be used with formsy-react, a form validation component for React forms.
Installation
To and install formsy-material-ui and add it to your package.json
, run:
$ npm install --save @charleskoehl/formsy-material-ui
You will also need to add formsy-react if not already installed:
$ npm install --save formsy-react
Note: For React 15.0.x compatibility, specify "formsy-react": "^0.18.0"
.
Usage
ES6 Imports
;;;;;;;;;
OR:
;
Events
Components allow for onChange
event handlers in props. They are fired when the value of the
component changes, regardless of the underlying handler (eg, FormsyToggle
uses onToggle
internally, but we
still use onChange
in props to hook into the event.)
The call back signatures for all onChange
handlers conform to
Material-UI's proposed Standardized Callback Signatures.
An example usage of this would be to use an onChange
for the FormsySelect and receive notifications when it changes.