Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions packages/form-render/src/form-core/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const FormCore:FC<FRProps> = (props) => {
className,
validateTrigger,
antdVersion,
onlyFormItem
} = transformProps({ ...props, ...schemProps });

useEffect(() => {
Expand Down Expand Up @@ -211,8 +212,19 @@ const FormCore:FC<FRProps> = (props) => {
</Button>
);
}

const renderFormItem = () => {
return (
<Row gutter={displayType === "row" ? 16 : 24}>
<RenderCore schema={schema} />
{operateExtra}
</Row>
);
};

return (
return onlyFormItem
? renderFormItem()
: (
<Form
className={classNames('fr-form', { [className]: !!className } )}
labelWrap={true}
Expand All @@ -223,10 +235,7 @@ const FormCore:FC<FRProps> = (props) => {
onFinishFailed={handleFinishFailed}
onValuesChange={handleValuesChange}
>
<Row gutter={displayType === 'row' ? 16 : 24}>
<RenderCore schema={schema} />
{operateExtra}
</Row>
{renderFormItem()}
{schema && !!footer && (
<Row gutter={displayType === 'row' ? 16 : 24}>
<Col span={24 / column}>
Expand Down
4 changes: 3 additions & 1 deletion packages/form-render/src/models/transformProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const transformProps = (props: any) => {
className,
validateTrigger,
antdVersion,
onlyFormItem,
...otherProps
} = props;

Expand Down Expand Up @@ -78,7 +79,8 @@ const transformProps = (props: any) => {
maxWidth,
className,
validateTrigger,
antdVersion
antdVersion,
onlyFormItem
};
};

Expand Down