Skip to content

Commit 0297f46

Browse files
committed
field style added to select
1 parent 5bfc98d commit 0297f46

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

client/packages/lowcoder/src/comps/comps/selectInputComp/selectComp.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { styleControl } from "comps/controls/styleControl";
2-
import { LabelStyle, SelectStyle } from "comps/controls/styleControlConstants";
2+
import { ComponentStyle, LabelStyle, SelectStyle } from "comps/controls/styleControlConstants";
33
import { trans } from "i18n";
44
import { stringExposingStateControl } from "../../controls/codeStateControl";
55
import { UICompBuilder } from "../../generators";
@@ -26,7 +26,8 @@ let SelectBasicComp = (function () {
2626
defaultValue: stringExposingStateControl("defaultValue"),
2727
value: stringExposingStateControl("value"),
2828
style: styleControl(SelectStyle),
29-
labelStyle: styleControl(LabelStyle)
29+
labelStyle: styleControl(LabelStyle),
30+
field: styleControl(ComponentStyle)
3031
};
3132
return new UICompBuilder(childrenMap, (props, dispatch) => {
3233
const [
@@ -42,7 +43,8 @@ let SelectBasicComp = (function () {
4243
return props.label({
4344
required: props.required,
4445
style: props.style,
45-
labelStyle:props.labelStyle,
46+
labelStyle: props.labelStyle,
47+
field:props.field,
4648
children: (
4749
<SelectUIView
4850
{...props}

client/packages/lowcoder/src/comps/comps/selectInputComp/selectCompConstants.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
TreeSelectStyleType,
3939
widthCalculator,
4040
heightCalculator,
41+
ComponentStyle,
4142
} from "comps/controls/styleControlConstants";
4243
import { stateComp, withDefault } from "../../generators";
4344
import {
@@ -56,6 +57,7 @@ import { blurMethod, focusMethod } from "comps/utils/methodUtils";
5657

5758
import { useContext } from "react";
5859
import { EditorContext } from "comps/editorState";
60+
import { styleControl } from "@lowcoder-ee/index.sdk";
5961

6062
export const getStyle = (
6163
style:
@@ -217,6 +219,7 @@ export const SelectChildrenMap = {
217219
viewRef: RefControl<BaseSelectRef>,
218220
margin: MarginControl,
219221
padding: PaddingControl,
222+
field:styleControl(ComponentStyle),
220223
...SelectInputValidationChildren,
221224
...formDataChildren,
222225
};
@@ -291,6 +294,7 @@ export const SelectPropertyView = (
291294
value: { propertyView: (params: ControlParams) => ControlNode };
292295
style: { getPropertyView: () => ControlNode };
293296
labelStyle: { getPropertyView: () => ControlNode };
297+
field: { getPropertyView: () => ControlNode };
294298
}
295299
) => (
296300
<>
@@ -336,6 +340,9 @@ export const SelectPropertyView = (
336340
<Section name={sectionNames.labelStyle}>
337341
{children.labelStyle.getPropertyView()}
338342
</Section>
343+
<Section name={sectionNames.field}>
344+
{children.field.getPropertyView()}
345+
</Section>
339346
</>
340347
)}
341348
</>

0 commit comments

Comments
 (0)