mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-24 22:18:41 +00:00
chore(ui): add internal form item props support in form utils (#11763)
This commit is contained in:
parent
5e8a98d7a4
commit
d2b832edc9
@ -56,10 +56,6 @@ const ConfigureService = ({
|
||||
'data-testid': 'description',
|
||||
initialValue: '',
|
||||
},
|
||||
formItemProps: {
|
||||
trigger: 'onTextChange',
|
||||
valuePropName: 'initialValue',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@ -198,10 +198,6 @@ const AddCustomProperty = () => {
|
||||
'data-testid': 'description',
|
||||
initialValue: '',
|
||||
},
|
||||
formItemProps: {
|
||||
trigger: 'onTextChange',
|
||||
valuePropName: 'initialValue',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@ -78,10 +78,6 @@ const TagsForm = ({
|
||||
'data-testid': 'description',
|
||||
initialValue: '',
|
||||
},
|
||||
formItemProps: {
|
||||
trigger: 'onTextChange',
|
||||
valuePropName: 'initialValue',
|
||||
},
|
||||
},
|
||||
...(showMutuallyExclusive
|
||||
? ([
|
||||
|
||||
@ -75,6 +75,7 @@ export const getField = (field: FieldProp) => {
|
||||
formItemLayout = 'vertical',
|
||||
} = field;
|
||||
|
||||
let internalFormItemProps: FormItemProps = {};
|
||||
let fieldElement: ReactNode = null;
|
||||
let fieldRules = [...rules];
|
||||
if (required) {
|
||||
@ -137,6 +138,11 @@ export const getField = (field: FieldProp) => {
|
||||
fieldElement = (
|
||||
<RichTextEditor {...(props as unknown as RichTextEditorProp)} />
|
||||
);
|
||||
internalFormItemProps = {
|
||||
...internalFormItemProps,
|
||||
trigger: 'onTextChange',
|
||||
valuePropName: 'initialValue',
|
||||
};
|
||||
|
||||
break;
|
||||
default:
|
||||
@ -155,6 +161,7 @@ export const getField = (field: FieldProp) => {
|
||||
label={label}
|
||||
name={name}
|
||||
rules={fieldRules}
|
||||
{...internalFormItemProps}
|
||||
{...formItemProps}>
|
||||
{fieldElement}
|
||||
</Form.Item>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user