Skip to content

Commit

Permalink
Allow editing a custom type like event-set component schema (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin authored Nov 27, 2024
1 parent a2aefc8 commit 6dd22fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/components/PropertyRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ export default class PropertyRow extends React.Component {
return <BooleanWidget {...widgetProps} />;
}
default: {
if (
props.schema.type === 'string' &&
widgetProps.value &&
typeof widgetProps.value !== 'string'
) {
// Allow editing a custom type like event-set component schema
widgetProps.value = props.schema.stringify(widgetProps.value);
}
return <InputWidget {...widgetProps} />;
}
}
Expand Down

0 comments on commit 6dd22fb

Please sign in to comment.