File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -879,23 +879,14 @@ export function updateSchemas(
879
879
generateSchemaFromElementProps ( elementArr ) ,
880
880
) ;
881
881
882
- const existingUiSchema : {
882
+ const newUiSchema : {
883
883
[ string ] : any ,
884
884
definitions ?: { [ string ] : any } ,
885
885
...
886
- } = Object . entries ( uischema )
887
- . filter ( ( [ key , _value ] ) => {
888
- return key in newSchema . properties || key . startsWith ( 'ui:' ) ;
889
- } )
890
- . reduce ( ( accumulator , currentValue ) => {
891
- const [ key , value ] = currentValue ;
892
- return { ...accumulator , [ key ] : value } ;
893
- } , { } ) ;
894
-
895
- const newUiSchema = Object . assign (
896
- { ...existingUiSchema } ,
897
- generateUiSchemaFromElementProps ( elementArr , definitionUi ) ,
898
- ) ;
886
+ } = generateUiSchemaFromElementProps ( elementArr , definitionUi ) ;
887
+ if ( uischema . definitions ) {
888
+ newUiSchema . definitions = uischema . definitions ;
889
+ }
899
890
900
891
// mandate that the type is an object if not already done
901
892
newSchema . type = 'object' ;
You can’t perform that action at this time.
0 commit comments