Pārlūkot izejas kodu

fix(material): omit useless value in json schema (#533)

Yiwei Mao 6 mēneši atpakaļ
vecāks
revīzija
cfe2339943

+ 3 - 1
packages/materials/form-materials/src/components/json-schema-editor/hooks.tsx

@@ -5,6 +5,8 @@
 
 import { useEffect, useMemo, useRef, useState } from 'react';
 
+import { omit } from 'lodash';
+
 import { IJsonSchema } from '../../typings';
 import { PropertyValueType } from './types';
 
@@ -113,7 +115,7 @@ export function usePropertiesEdit(
           continue;
         }
 
-        nextProperties[_property.name] = _property;
+        nextProperties[_property.name] = omit(_property, ['key', 'name', 'isPropertyRequired']);
 
         if (_property.isPropertyRequired) {
           nextRequired.push(_property.name);