mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-25 18:30:00 +00:00
chore(ui): hide json schema fields default description (#11831)
This commit is contained in:
parent
80cadef640
commit
aa490cb716
@ -1,5 +1,3 @@
|
|||||||
import { RegistryFieldsType } from '@rjsf/utils';
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2023 Collate.
|
* Copyright 2023 Collate.
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -12,10 +10,8 @@ import { RegistryFieldsType } from '@rjsf/utils';
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
const CustomDescriptionField = () => {
|
const DescriptionFieldTemplate = () => {
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const customFields: RegistryFieldsType = {
|
export default DescriptionFieldTemplate;
|
||||||
DescriptionField: CustomDescriptionField,
|
|
||||||
};
|
|
@ -16,7 +16,7 @@ import Form, { FormProps, IChangeEvent } from '@rjsf/core';
|
|||||||
import { Button } from 'antd';
|
import { Button } from 'antd';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { ArrayFieldTemplate } from 'components/JSONSchemaTemplate/ArrayFieldTemplate';
|
import { ArrayFieldTemplate } from 'components/JSONSchemaTemplate/ArrayFieldTemplate';
|
||||||
import { customFields } from 'components/JSONSchemaTemplate/CustomFields';
|
import DescriptionFieldTemplate from 'components/JSONSchemaTemplate/DescriptionFieldTemplate';
|
||||||
import { ObjectFieldTemplate } from 'components/JSONSchemaTemplate/ObjectFieldTemplate';
|
import { ObjectFieldTemplate } from 'components/JSONSchemaTemplate/ObjectFieldTemplate';
|
||||||
import { ServiceCategory } from 'enums/service.enum';
|
import { ServiceCategory } from 'enums/service.enum';
|
||||||
import { useAirflowStatus } from 'hooks/useAirflowStatus';
|
import { useAirflowStatus } from 'hooks/useAirflowStatus';
|
||||||
@ -112,7 +112,6 @@ const FormBuilder: FunctionComponent<Props> = ({
|
|||||||
className={classNames('rjsf', props.className, {
|
className={classNames('rjsf', props.className, {
|
||||||
'no-header': !showFormHeader,
|
'no-header': !showFormHeader,
|
||||||
})}
|
})}
|
||||||
fields={customFields}
|
|
||||||
formContext={{ handleFocus: onFocus }}
|
formContext={{ handleFocus: onFocus }}
|
||||||
formData={localFormData}
|
formData={localFormData}
|
||||||
idSeparator="/"
|
idSeparator="/"
|
||||||
@ -122,6 +121,7 @@ const FormBuilder: FunctionComponent<Props> = ({
|
|||||||
templates={{
|
templates={{
|
||||||
ArrayFieldTemplate: ArrayFieldTemplate,
|
ArrayFieldTemplate: ArrayFieldTemplate,
|
||||||
ObjectFieldTemplate: ObjectFieldTemplate,
|
ObjectFieldTemplate: ObjectFieldTemplate,
|
||||||
|
DescriptionFieldTemplate: DescriptionFieldTemplate,
|
||||||
}}
|
}}
|
||||||
transformErrors={transformErrors}
|
transformErrors={transformErrors}
|
||||||
uiSchema={uiSchema}
|
uiSchema={uiSchema}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user