Skip to content

Commit 53a4a85

Browse files
authored
Merge pull request #541 from lowcoder-org/feat/Layout-Mode
Introduce Layout Mode and Fixes - final
2 parents 93b11fc + 85a1c6a commit 53a4a85

File tree

9 files changed

+786
-712
lines changed

9 files changed

+786
-712
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const childrenMap = {
103103
searchCompletePY: BoolControl,
104104
searchLabelOnly: BoolControl.DEFAULT_TRUE,
105105
valueOrLabel: dropdownControl(valueOrLabelOption, "label"),
106-
autoCompleteType: dropdownControl(autoCompleteType, "AntDesign"),
106+
autoCompleteType: dropdownControl(autoCompleteType, "normal"),
107107
autocompleteIconColor: dropdownControl(autocompleteIconColor, "blue"),
108108
componentSize: dropdownControl(componentSize, "small"),
109109
valueInItems: booleanExposingStateControl("valueInItems"),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const childrenMap = {
168168
value: stringExposingStateControl("value"),
169169
hideToolbar: BoolControl,
170170
readOnly: BoolControl,
171-
autoHeight: AutoHeightControl,
171+
autoHeight: withDefault(AutoHeightControl, "fixed"),
172172
placeholder: withDefault(StringControl, trans("richTextEditor.placeholder")),
173173
toolbar: withDefault(StringControl, JSON.stringify(toolbarOptions)),
174174
onEvent: ChangeEventHandlerControl,
@@ -327,7 +327,7 @@ const RichTextEditorCompBase = new UICompBuilder(childrenMap, (props) => {
327327
</Section>
328328
)}
329329

330-
{["logic", "both"].includes(useContext(EditorContext).editorModeStatus) && (
330+
{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
331331
<>
332332
<Section name={sectionNames.layout}>
333333
{children.autoHeight.getPropertyView()}

client/packages/lowcoder/src/comps/comps/textInputComp/textAreaComp.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { Section, sectionNames } from "lowcoder-design";
88
import { BoolControl } from "../../controls/boolControl";
99
import { AutoHeightControl } from "../../controls/autoHeightControl";
10-
import { UICompBuilder } from "../../generators";
10+
import { UICompBuilder, withDefault } from "../../generators";
1111
import { FormDataPropertyView } from "../formComp/formDataConstants";
1212
import {
1313
getStyle,
@@ -45,15 +45,19 @@ const TextAreaStyled = styled(TextArea)<{
4545
const Wrapper = styled.div<{
4646
$style: InputLikeStyleType;
4747
}>`
48-
height: 100%;
48+
height: 100% !important;
49+
50+
.ant-input {
51+
height:100% !important;
52+
}
4953
5054
.ant-input-clear-icon {
51-
opacity: 0.45;
55+
opacity: 0.75;
5256
color: ${(props) => props.$style.text};
5357
top: 10px;
5458
5559
&:hover {
56-
opacity: 0.65;
60+
opacity: 0.9;
5761
color: ${(props) => props.$style.text};
5862
}
5963
}
@@ -64,7 +68,7 @@ let TextAreaTmpComp = (function () {
6468
...textInputChildren,
6569
viewRef: RefControl<TextAreaRef>,
6670
allowClear: BoolControl,
67-
autoHeight: AutoHeightControl,
71+
autoHeight: withDefault(AutoHeightControl, "fixed"),
6872
style: styleControl(InputLikeStyle),
6973
};
7074
return new UICompBuilder(childrenMap, (props) => {
@@ -73,12 +77,11 @@ let TextAreaTmpComp = (function () {
7377
required: props.required,
7478
children: (
7579
<Wrapper $style={props.style}>
76-
<TextAreaStyled
80+
<TextAreaStyled
7781
{...inputProps}
7882
ref={props.viewRef}
7983
allowClear={props.allowClear}
80-
autoSize={props.autoHeight}
81-
style={{ height: "100%", maxHeight: "100%", resize: "none" }}
84+
style={{ height: "100% !important", resize: "vertical" }}
8285
$style={props.style}
8386
/>
8487
</Wrapper>
@@ -105,7 +108,8 @@ let TextAreaTmpComp = (function () {
105108
<Section name={sectionNames.advanced}>
106109
{allowClearPropertyView(children)}
107110
{readOnlyPropertyView(children)}
108-
</Section><TextInputValidationSection {...children} /></>
111+
</Section>
112+
<TextInputValidationSection {...children} /></>
109113
)}
110114

111115
{useContext(EditorContext).editorModeStatus === "layout" && (

0 commit comments

Comments
 (0)