@@ -31,7 +31,7 @@ const getArrayItemDefault = (schema: JsonSchemaType): JsonValue => {
31
31
if ( "default" in schema && schema . default !== undefined ) {
32
32
return schema . default ;
33
33
}
34
-
34
+
35
35
switch ( schema . type ) {
36
36
case "string" :
37
37
return "" ;
@@ -289,13 +289,15 @@ const DynamicJsonForm = ({
289
289
case "array" : {
290
290
const arrayValue = Array . isArray ( currentValue ) ? currentValue : [ ] ;
291
291
if ( ! propSchema . items ) return null ;
292
-
292
+
293
293
// If the array items are simple, render as form fields, otherwise use JSON editor
294
294
if ( isSimpleObject ( propSchema . items ) ) {
295
295
return (
296
296
< div className = "space-y-4" >
297
297
{ 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 >
299
301
) }
300
302
301
303
{ propSchema . items ?. description && (
@@ -333,10 +335,7 @@ const DynamicJsonForm = ({
333
335
const defaultValue = getArrayItemDefault (
334
336
propSchema . items as JsonSchemaType ,
335
337
) ;
336
- handleFieldChange ( path , [
337
- ...arrayValue ,
338
- defaultValue ,
339
- ] ) ;
338
+ handleFieldChange ( path , [ ...arrayValue , defaultValue ] ) ;
340
339
} }
341
340
title = {
342
341
propSchema . items ?. description
@@ -350,7 +349,7 @@ const DynamicJsonForm = ({
350
349
</ div >
351
350
) ;
352
351
}
353
-
352
+
354
353
// For complex arrays, fall back to JSON editor
355
354
return (
356
355
< JsonEditor
0 commit comments