Skip to content

Commit b2634fc

Browse files
lowcoder-comps backward compatibility fix
1 parent 7153da0 commit b2634fc

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

client/packages/lowcoder-comps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-comps",
3-
"version": "2.4.14",
3+
"version": "2.4.15",
44
"type": "module",
55
"license": "MIT",
66
"dependencies": {

client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ if (DragEventHandlerControl) {
105105
onDropEvent: DragEventHandlerControl,
106106
}
107107
}
108+
if (EventModalStyle) {
109+
childrenMap = {
110+
...childrenMap,
111+
modalStyle: styleControl(EventModalStyle),
112+
}
113+
}
114+
108115
let CalendarBasicComp = (function () {
109116
return new UICompBuilder(childrenMap, (props: {
110117
events: any;
@@ -795,9 +802,11 @@ let CalendarBasicComp = (function () {
795802
{children.style.getPropertyView()}
796803
</Section>
797804
<Section name={sectionNames.animationStyle} hasTooltip={true}>{children.animationStyle.getPropertyView()}</Section>
798-
<Section name={sectionNames.modalStyle}>
799-
{children.modalStyle.getPropertyView()}
800-
</Section>
805+
{Boolean(children.modalStyle) && (
806+
<Section name={sectionNames.modalStyle}>
807+
{children.modalStyle.getPropertyView()}
808+
</Section>
809+
)}
801810
</>
802811
);
803812
})

client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ export const Event = styled.div<{
768768

769769

770770
export const FormWrapper = styled(Form)<{
771-
$modalStyle: EventModalStyleType
771+
$modalStyle?: EventModalStyleType
772772
}>`
773773
.ant-form-item-label {
774774
width: 125px;
@@ -789,11 +789,11 @@ export const FormWrapper = styled(Form)<{
789789
790790
// Setting style for input fields
791791
.ant-input {
792-
background-color: ${(props) => props.$modalStyle.labelBackground };
793-
border-color: ${(props) => props.$modalStyle.border};
794-
border-width: ${(props) => props.$modalStyle.borderWidth};
795-
border-style: ${(props) => props.$modalStyle.borderStyle};
796-
color: ${(props) => props.$modalStyle.text};
792+
background-color: ${(props) => props.$modalStyle?.labelBackground };
793+
border-color: ${(props) => props.$modalStyle?.border};
794+
border-width: ${(props) => props.$modalStyle?.borderWidth};
795+
border-style: ${(props) => props.$modalStyle?.borderStyle};
796+
color: ${(props) => props.$modalStyle?.text};
797797
}
798798
799799
`;

0 commit comments

Comments
 (0)