Skip to content

Commit a0199e4

Browse files
handle form height based for fixed height setting
1 parent c063b69 commit a0199e4

File tree

1 file changed

+23
-6
lines changed
  • client/packages/lowcoder/src/comps/comps/formComp

1 file changed

+23
-6
lines changed

client/packages/lowcoder/src/comps/comps/formComp/formComp.tsx

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ import log from "loglevel";
5757
import { DisabledContext } from "comps/generators/uiCompBuilder";
5858
import { LoadingOutlined } from "@ant-design/icons";
5959
import { messageInstance } from "lowcoder-design";
60+
import { styled } from "styled-components";
61+
62+
const FormWrapper = styled.div`
63+
height: 100%;
64+
.ant-spin-nested-loading {
65+
height: 100%;
66+
.ant-spin-container {
67+
height: 100%;
68+
}
69+
}
70+
`;
6071

6172
const eventOptions = [submitEvent] as const;
6273

@@ -172,12 +183,18 @@ const FormBaseComp = (function () {
172183
return new ContainerCompBuilder(childrenMap, (props, dispatch) => {
173184
return (
174185
<DisabledContext.Provider value={props.disabled}>
175-
<Spin indicator={loadingIcon} spinning={props.loading}>
176-
<TriContainer
177-
{...props}
178-
hintPlaceholder={<BodyPlaceholder {...props} dispatch={dispatch} />}
179-
/>
180-
</Spin>
186+
<FormWrapper>
187+
<Spin
188+
indicator={loadingIcon}
189+
spinning={props.loading}
190+
style={{height: '100%'}}
191+
>
192+
<TriContainer
193+
{...props}
194+
hintPlaceholder={<BodyPlaceholder {...props} dispatch={dispatch} />}
195+
/>
196+
</Spin>
197+
</FormWrapper>
181198
</DisabledContext.Provider>
182199
);
183200
})

0 commit comments

Comments
 (0)