Skip to content

Commit

Permalink
fix(sidebar): Ext-collabs see incorrect editors for some metadata fie…
Browse files Browse the repository at this point in the history
…lds (#683)

* fix(sidebar): Ext-collabs see incorrect editors for some metadata fields

* fix(sidebar): Ext-collabs see incorrect editors for some metadata fields
  • Loading branch information
patrickpaul authored and priyajeet committed Dec 4, 2018
1 parent dda23b9 commit 604bf46
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/api/Metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,11 +630,16 @@ class Metadata extends File {
return null;
}

legacyInstance.fields.forEach(({ key, type, displayName, options, description }) => {
legacyInstance.fields.forEach(({ key, type, displayName, options, description, editor }) => {
let v2Type = type;
if (type === 'array') {
if (editor === 'calendar') {
v2Type = 'date';
} else if (editor === 'dropdown') {
v2Type = 'enum';
} else if (editor === 'multipleSelection') {
v2Type = 'multiSelect';
}

fields.push({
id: uniqueId('metadata_field_'),
type: v2Type,
Expand Down

0 comments on commit 604bf46

Please sign in to comment.