Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ export function getUiPlaceholder(props: FieldProps): string | undefined {
} else if (placeholder) {
fieldUIPlaceholder = placeholder;
} else if (schema && Array.isArray(schema.examples) && schema.examples.length > 0) {
fieldUIPlaceholder = `ex. ${schema.examples.join(', ')}`;
const examplesStrings = schema.examples.map((example) => {
Comment thread
GeoffCoxMSFT marked this conversation as resolved.
if (typeof example === 'object') {
Comment thread
hatpick marked this conversation as resolved.
return JSON.stringify(example);
}
return example;
});
fieldUIPlaceholder = `ex. ${examplesStrings.join(', ')}`;
}

if (fieldUIPlaceholder && schema.pattern) {
Expand Down