mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 17:41:43 -05:00
fix default props
This commit is contained in:
parent
3677181f02
commit
4e31ead9c9
1 changed files with 7 additions and 2 deletions
|
@ -14,6 +14,10 @@ class FormComponent extends Component {
|
|||
this.state = {};
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
formComponents: {}
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
if (this.showCharsRemaining()) {
|
||||
const value = this.getValue();
|
||||
|
@ -202,7 +206,7 @@ class FormComponent extends Component {
|
|||
*/
|
||||
getFormInput = () => {
|
||||
const inputType = this.getType();
|
||||
const FormComponents = this.getFormComponents;
|
||||
const FormComponents = this.getFormComponents();
|
||||
|
||||
// if input is a React component, use it
|
||||
if (typeof this.props.input === 'function') {
|
||||
|
@ -275,7 +279,7 @@ class FormComponent extends Component {
|
|||
}
|
||||
render() {
|
||||
|
||||
const FormComponents = this.getFormComponents;
|
||||
const FormComponents = this.getFormComponents();
|
||||
|
||||
if (this.props.intlInput) {
|
||||
return <FormComponents.FormIntl {...this.props} />;
|
||||
|
@ -331,6 +335,7 @@ FormComponent.contextTypes = {
|
|||
getDocument: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
|
||||
module.exports = FormComponent
|
||||
|
||||
registerComponent('FormComponent', FormComponent);
|
||||
|
|
Loading…
Add table
Reference in a new issue