Skip to content

Commit 38311f7

Browse files
committed
container padding updated
1 parent 47300c1 commit 38311f7

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ const InputStyle = styled(Input)<{ $style: InputLikeStyleType }>`
6363
${getStyle(props.$style)}
6464
input {
6565
padding: ${props.style?.padding};
66-
rotate: ${props?.$style?.rotation};
6766
}
6867
.ant-select-single {
6968
width: 100% !important;

client/packages/lowcoder/src/comps/generators/uiCompBuilder.tsx

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,14 @@ function UIView(props: {
221221
const comp = props.comp;
222222
const childrenProps = childrenToProps(comp.children);
223223
const parentDisabled = useContext(DisabledContext);
224-
const disabled = childrenProps["disabled"];
225-
if (disabled !== undefined && typeof disabled === "boolean") {
226-
childrenProps["disabled"] = disabled || parentDisabled;
224+
const disabled = childrenProps['disabled'];
225+
if (disabled !== undefined && typeof disabled === 'boolean') {
226+
childrenProps['disabled'] = disabled || parentDisabled;
227227
}
228228

229229
//ADDED BY FRED
230230
if (childrenProps.events) {
231-
const events = childrenProps.events as { value?: any[] };
231+
const events = childrenProps.events as {value?: any[]};
232232
if (!events.value || events.value.length === 0) {
233233
events.value = [];
234234
}
@@ -246,22 +246,31 @@ function UIView(props: {
246246
);
247247
}
248248

249+
let defaultChildren = comp.children;
250+
const isNotContainer = defaultChildren.hasOwnProperty('style');
251+
let rotationVal = null
252+
if (isNotContainer) {
253+
rotationVal = defaultChildren.style.children.rotation.valueAndMsg.value;
254+
}
249255
return (
250256
<div
251257
ref={props.innerRef}
252258
className={childrenProps.className as string}
253259
data-testid={childrenProps.dataTestId as string}
254260
style={{
255-
width: "100%",
256-
height: "100%",
257-
margin: "0px",
258-
padding: "0px",
259-
}}>
261+
width: '100%',
262+
height: '100%',
263+
margin: '0px',
264+
padding:
265+
rotationVal === null
266+
? '0px'
267+
: rotationVal === '' || rotationVal === '0deg'
268+
? '0px'
269+
: '50% 0px',
270+
}}
271+
>
260272
<HidableView hidden={childrenProps.hidden as boolean}>
261-
{props.viewFn(
262-
childrenProps,
263-
comp.dispatch
264-
)}
273+
{props.viewFn(childrenProps, comp.dispatch)}
265274
</HidableView>
266275
</div>
267276
);

0 commit comments

Comments
 (0)