Skip to content

Commit

Permalink
editor: handle custom form type
Browse files Browse the repository at this point in the history
* Handles custom form types from JSON schema and not only the textarea type.
* Contributes to make rero/sonar#530 work.

Co-Authored-by: Sébastien Délèze <[email protected]>
  • Loading branch information
Sébastien Délèze committed Apr 23, 2021
1 parent 977dc0b commit 350baba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/sonar/src/app/deposit/editor/editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,9 @@ export class EditorComponent implements OnInit {
};
}

// change field input to textarea
if (fieldSchema.form.type === 'textarea') {
fieldConfig.type = 'textarea';
// There's a custom form type
if (fieldSchema.form.type != null) {
fieldConfig.type = fieldSchema.form.type;
}

// expression properties
Expand Down

0 comments on commit 350baba

Please sign in to comment.