Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/client/react/module/common/component/rjs-form-component.tsx b/src/client/react/module/common/component/rjs-form-component.tsx
- index 4719d92..a680d9d 100644
- --- a/src/client/react/module/common/component/rjs-form-component.tsx
- +++ b/src/client/react/module/common/component/rjs-form-component.tsx
- @@ -30,22 +30,23 @@ export default class RJSFormComponent extends React.Component<IRJSFormComponentP
- });
- }
- - public render() {
- - const formData = toJS(this.props.data);
- - const fields = { layout: LayoutField };
- + public getFormProps() {
- + return {
- + schema: this.props.dataSchema,
- + uiSchema: this.props.uiSchema,
- + formData: toJS(this.props.data),
- + onChange: this.props.change.bind(this),
- + onSubmit: this.props.submit.bind(this),
- + showErrorList: false,
- + fields: { layout: LayoutField },
- + transformErrors: this.transformErrors,
- + };
- + }
- + public render() {
- return (
- <div>
- - <Form
- - schema={this.props.dataSchema}
- - uiSchema={this.props.uiSchema}
- - formData={formData}
- - onChange={this.props.change.bind(this)}
- - onSubmit={this.props.submit.bind(this)}
- - showErrorList={false}
- - fields={fields}
- - // transformErrors={this.transformErrors}
- - >
- + <Form {...this.getFormProps()}>
- <div className="rjs-button">
- <Button color="success" type="submit">Save and Continue</Button>
- </div>
Add Comment
Please, Sign In to add comment