diff --git a/package.json b/package.json index c869d5b72..cfc0ab60f 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "escape-string-regexp": "^1.0.5", "express": "^4.14.0", "flat": "^4.0.0", - "formsy-react": "^0.19.5", - "formsy-react-components": "^0.11.1", + "formsy-react": "^1.1.4", + "formsy-react-components": "^1.0.0", "graphql": "^0.10.5", "graphql-anywhere": "^3.0.1", "graphql-date": "^1.0.2", diff --git a/packages/vulcan-forms/lib/components/FormComponent.jsx b/packages/vulcan-forms/lib/components/FormComponent.jsx index 3bbd07f75..390110986 100644 --- a/packages/vulcan-forms/lib/components/FormComponent.jsx +++ b/packages/vulcan-forms/lib/components/FormComponent.jsx @@ -80,7 +80,9 @@ class FormComponent extends Component { Function passed to form controls (always controlled) to update their value */ - handleChange = (name, value) => { + handleChange = (event) => { + let value = event.target.value; + // if value is an empty string, delete the field if (value === '') { value = null; diff --git a/packages/vulcan-ui-bootstrap/lib/components/forms/Default.jsx b/packages/vulcan-ui-bootstrap/lib/components/forms/Default.jsx index 0b5ba5082..a26b21ede 100644 --- a/packages/vulcan-ui-bootstrap/lib/components/forms/Default.jsx +++ b/packages/vulcan-ui-bootstrap/lib/components/forms/Default.jsx @@ -1,8 +1,20 @@ import React from 'react'; -import { Input } from 'formsy-react-components'; import { registerComponent } from 'meteor/vulcan:core'; +import FormGroup from 'react-bootstrap/lib/FormGroup'; +import ControlLabel from 'react-bootstrap/lib/ControlLabel'; +import FormControl from 'react-bootstrap/lib/FormControl'; +import HelpBlock from 'react-bootstrap/lib/HelpBlock'; -const Default = ({refFunction, inputProperties}) => - ; +const Default = ({ refFunction, inputProperties }) => ( + + {inputProperties.label} + + {/* */} + {/* Validation is based on string length. */} + +); registerComponent('FormComponentDefault', Default);