Skip to content

Commit c7c8ed8

Browse files
committed
field added to rating
1 parent f6222cd commit c7c8ed8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { UICompBuilder, withDefault } from "../generators";
1010
import { CommonNameConfig, NameConfig, withExposingConfigs } from "../generators/withExposing";
1111
import { formDataChildren, FormDataPropertyView } from "./formComp/formDataConstants";
1212
import { styleControl } from "comps/controls/styleControl";
13-
import { LabelStyle, RatingStyle, RatingStyleType } from "comps/controls/styleControlConstants";
13+
import { ComponentStyle, LabelStyle, RatingStyle, RatingStyleType } from "comps/controls/styleControlConstants";
1414
import { migrateOldData } from "comps/generators/simpleGenerators";
1515
import { disabledPropertyView, hiddenPropertyView } from "comps/utils/propertyUtils";
1616
import { trans } from "i18n";
@@ -45,6 +45,7 @@ const RatingBasicComp = (function () {
4545
onEvent: eventHandlerControl(EventOptions),
4646
style: migrateOldData(styleControl(RatingStyle), fixOldData),
4747
labelStyle: styleControl(LabelStyle.filter((style) => ['accent', 'validate'].includes(style.name) === false)),
48+
field:styleControl(ComponentStyle),
4849
...formDataChildren,
4950
};
5051
return new UICompBuilder(childrenMap, (props) => {
@@ -66,6 +67,7 @@ const RatingBasicComp = (function () {
6667
return props.label({
6768
style: props.style,
6869
labelStyle: props.labelStyle,
70+
field:props.field,
6971
children: (
7072
<RateStyled
7173
count={props.max}
@@ -119,6 +121,9 @@ const RatingBasicComp = (function () {
119121
<Section name={sectionNames.labelStyle}>
120122
{children.labelStyle.getPropertyView()}
121123
</Section>
124+
<Section name={sectionNames.field}>
125+
{children.field.getPropertyView()}
126+
</Section>
122127
</>
123128
)}
124129
</>

0 commit comments

Comments
 (0)