Skip to content

Commit 0a1de24

Browse files
committed
Fix formatting
1 parent 3475670 commit 0a1de24

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

client/src/components/DynamicJsonForm.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const getArrayItemDefault = (schema: JsonSchemaType): JsonValue => {
3131
if ("default" in schema && schema.default !== undefined) {
3232
return schema.default;
3333
}
34-
34+
3535
switch (schema.type) {
3636
case "string":
3737
return "";
@@ -289,13 +289,15 @@ const DynamicJsonForm = ({
289289
case "array": {
290290
const arrayValue = Array.isArray(currentValue) ? currentValue : [];
291291
if (!propSchema.items) return null;
292-
292+
293293
// If the array items are simple, render as form fields, otherwise use JSON editor
294294
if (isSimpleObject(propSchema.items)) {
295295
return (
296296
<div className="space-y-4">
297297
{propSchema.description && (
298-
<p className="text-sm text-gray-600">{propSchema.description}</p>
298+
<p className="text-sm text-gray-600">
299+
{propSchema.description}
300+
</p>
299301
)}
300302

301303
{propSchema.items?.description && (
@@ -333,10 +335,7 @@ const DynamicJsonForm = ({
333335
const defaultValue = getArrayItemDefault(
334336
propSchema.items as JsonSchemaType,
335337
);
336-
handleFieldChange(path, [
337-
...arrayValue,
338-
defaultValue,
339-
]);
338+
handleFieldChange(path, [...arrayValue, defaultValue]);
340339
}}
341340
title={
342341
propSchema.items?.description
@@ -350,7 +349,7 @@ const DynamicJsonForm = ({
350349
</div>
351350
);
352351
}
353-
352+
354353
// For complex arrays, fall back to JSON editor
355354
return (
356355
<JsonEditor

0 commit comments

Comments
 (0)