Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/src/components/DynamicJsonForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ const DynamicJsonForm = forwardRef<DynamicJsonFormRef, DynamicJsonFormProps>(
debouncedUpdateParent(newValue);
}}
error={jsonError}
placeholder={schema.description}
/>
) : // If schema type is object but value is not an object or is empty, and we have actual JSON data,
// render a simple representation of the JSON data
Expand Down
3 changes: 3 additions & 0 deletions client/src/components/JsonEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ interface JsonEditorProps {
value: string;
onChange: (value: string) => void;
error?: string;
placeholder?: string;
}

const JsonEditor = ({
value,
onChange,
error: externalError,
placeholder,
}: JsonEditorProps) => {
const [editorContent, setEditorContent] = useState(value || "");
const [internalError, setInternalError] = useState<string | undefined>(
Expand Down Expand Up @@ -48,6 +50,7 @@ const JsonEditor = ({
Prism.highlight(code, Prism.languages.json, "json")
}
padding={10}
placeholder={placeholder}
style={{
fontFamily: '"Fira code", "Fira Mono", monospace',
fontSize: 14,
Expand Down