From 6dd22fbc407b351295c27d1a54a08bf584a84035 Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Wed, 27 Nov 2024 21:13:45 +0100 Subject: [PATCH] Allow editing a custom type like event-set component schema (#781) --- src/components/components/PropertyRow.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/components/PropertyRow.js b/src/components/components/PropertyRow.js index e1748f3e..1e1e6b91 100644 --- a/src/components/components/PropertyRow.js +++ b/src/components/components/PropertyRow.js @@ -103,6 +103,14 @@ export default class PropertyRow extends React.Component { return ; } 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 ; } }