Skip to content

Commit

Permalink
[#41] Move condition to render form in Record to RecordForm component.
Browse files Browse the repository at this point in the history
  • Loading branch information
kostobog committed Dec 12, 2023
1 parent 3b5edde commit 792a0a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/components/record/Record.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Record extends React.Component {
{this._showInstitution() && this._renderInstitution()}
<RecordProvenance record={record}/>
</form>
{record.formTemplate && this._renderForm()}
{this._renderForm()}
{this._renderButtons()}
{showAlert && recordSaved.status === ACTION_STATUS.ERROR &&
<div>
Expand Down
2 changes: 1 addition & 1 deletion js/components/record/RecordForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class RecordForm extends React.Component {
return <Loader/>;
}

return <SForms
return !!this.state.form && <SForms
ref={this.refForm}
form={this.state.form}
formData={this.props.record.question}
Expand Down

0 comments on commit 792a0a9

Please sign in to comment.