Skip to content

Commit bfbcd9e

Browse files
authored
Merge branch 'dev' into subscription-handling
2 parents fc08749 + 84d1ea3 commit bfbcd9e

File tree

26 files changed

+156
-77
lines changed

26 files changed

+156
-77
lines changed

.github/workflows/docker-images.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
options:
1212
- latest
1313
- test
14+
- 2.4.6
1415
build_allinone:
1516
type: boolean
1617
description: 'Build the All-In-One image'

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.9
1+
2.4.12

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-frontend",
3-
"version": "2.4.9",
3+
"version": "2.4.12",
44
"type": "module",
55
"private": true,
66
"workspaces": [

client/packages/lowcoder/src/components/ThemeSettingsSelector.tsx

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default function ThemeSettingsSelector(props: ColorConfigProps) {
9898
gridBgImagePosition: defaultGridBgImagePosition,
9999
gridBgImageOrigin: defaultGridBgImageOrigin,
100100
} = props;
101-
101+
102102
const configChangeWithDebounce = _.debounce(configChange, 0);
103103
const [color, setColor] = useState(defaultColor);
104104
const [radius, setRadius] = useState(defaultRadius);
@@ -239,20 +239,20 @@ export default function ThemeSettingsSelector(props: ColorConfigProps) {
239239
configChange({ themeSettingKey, gridColumns: result });
240240
};
241241

242-
const gridRowCountInputBlur = (value: number) => {
242+
const gridRowCountInputBlur = (value: string) => {
243243
let result = Infinity;
244-
if (value > 0) {
245-
result = value;
244+
if (value !== '') {
245+
result = Number(value);
246246
}
247247

248248
setGridRowCount(result);
249249
configChange({ themeSettingKey, gridRowCount: result });
250250
};
251251

252-
const gridPaddingInputBlur = (padding: number) => {
252+
const gridPaddingInputBlur = (padding: string) => {
253253
let result = 20;
254-
if (padding > 0) {
255-
result = padding;
254+
if (padding !== '') {
255+
result = Number(padding);
256256
}
257257

258258
if (themeSettingKey === 'gridPaddingX') {
@@ -346,6 +346,14 @@ export default function ThemeSettingsSelector(props: ColorConfigProps) {
346346
setDataLoaders(defaultShowDataLoaders);
347347
}, [defaultShowDataLoaders]);
348348

349+
useEffect(() => {
350+
setGridPaddingX(defaultGridPaddingX);
351+
}, [defaultGridPaddingX]);
352+
353+
useEffect(() => {
354+
setGridPaddingY(defaultGridPaddingY);
355+
}, [defaultGridPaddingY]);
356+
349357
return (
350358
<ConfigItem className={props.className}>
351359
{themeSettingKey !== "showDataLoadingIndicators"
@@ -587,11 +595,16 @@ export default function ThemeSettingsSelector(props: ColorConfigProps) {
587595
type="number"
588596
min={0}
589597
value={gridRowCount}
590-
onChange={(e) => setGridRowCount(Number(e.target.value))}
591-
onBlur={(e) => gridRowCountInputBlur(Number(e.target.value))}
598+
onChange={(e) => {
599+
if (e.target.value === '') {
600+
return setGridRowCount(Infinity);
601+
}
602+
setGridRowCount(Number(e.target.value))
603+
}}
604+
onBlur={(e) => gridRowCountInputBlur(e.target.value)}
592605
onKeyUp={(e) =>
593606
e.nativeEvent.key === "Enter" &&
594-
gridRowCountInputBlur(Number(e.currentTarget.value))
607+
gridRowCountInputBlur(e.currentTarget.value)
595608
}
596609
/>
597610
</div>
@@ -606,11 +619,16 @@ export default function ThemeSettingsSelector(props: ColorConfigProps) {
606619
type="number"
607620
min={0}
608621
value={gridPaddingX}
609-
onChange={(e) => setGridPaddingX(Number(e.target.value))}
610-
onBlur={(e) => gridPaddingInputBlur(Number(e.target.value))}
622+
onChange={(e) => {
623+
if (e.target.value === '') {
624+
return setGridPaddingX(undefined);
625+
}
626+
setGridPaddingX(Number(e.target.value))
627+
}}
628+
onBlur={(e) => gridPaddingInputBlur(e.target.value)}
611629
onKeyUp={(e) =>
612630
e.nativeEvent.key === "Enter" &&
613-
gridPaddingInputBlur(Number(e.currentTarget.value))
631+
gridPaddingInputBlur(e.currentTarget.value)
614632
}
615633
/>
616634
</div>
@@ -625,11 +643,16 @@ export default function ThemeSettingsSelector(props: ColorConfigProps) {
625643
type="number"
626644
min={0}
627645
value={gridPaddingY}
628-
onChange={(e) => setGridPaddingY(Number(e.target.value))}
629-
onBlur={(e) => gridPaddingInputBlur(Number(e.target.value))}
646+
onChange={(e) => {
647+
if (e.target.value === '') {
648+
return setGridPaddingY(undefined);
649+
}
650+
setGridPaddingY(Number(e.target.value))
651+
}}
652+
onBlur={(e) => gridPaddingInputBlur(e.target.value)}
630653
onKeyUp={(e) =>
631654
e.nativeEvent.key === "Enter" &&
632-
gridPaddingInputBlur(Number(e.currentTarget.value))
655+
gridPaddingInputBlur(e.currentTarget.value)
633656
}
634657
/>
635658
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const ButtonTmpComp = (function () {
136136
};
137137
return new UICompBuilder(childrenMap, (props) => {
138138
return(
139-
<ButtonCompWrapper disabled={props.disabled}>
139+
<ButtonCompWrapper $disabled={props.disabled}>
140140
<EditorContext.Consumer>
141141
{(editorState) => (
142142
<Button100

client/packages/lowcoder/src/comps/comps/buttonComp/buttonCompConstants.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ export const Button100 = styled(Button)<{ $buttonStyle?: ButtonStyleType }>`
6868
line-height:${(props) => props.$buttonStyle?.lineHeight};
6969
`;
7070

71-
export const ButtonCompWrapper = styled.div<{ disabled: boolean }>`
71+
export const ButtonCompWrapper = styled.div<{ $disabled: boolean }>`
72+
display: flex;
73+
7274
// The button component is disabled but can respond to drag & select events
7375
${(props) =>
74-
props.disabled &&
76+
props.$disabled &&
7577
`
7678
cursor: not-allowed;
7779
button:disabled {

client/packages/lowcoder/src/comps/comps/buttonComp/dropdownComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const DropdownTmpComp = (function () {
116116
);
117117

118118
return (
119-
<ButtonCompWrapper disabled={props.disabled}>
119+
<ButtonCompWrapper $disabled={props.disabled}>
120120
{props.onlyMenu ? (
121121
<Dropdown
122122
disabled={props.disabled}

client/packages/lowcoder/src/comps/comps/buttonComp/linkComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const LinkTmpComp = (function () {
9595
// chrome86 bug: button children should not contain only empty span
9696
const hasChildren = hasIcon(props.prefixIcon) || !!props.text || hasIcon(props.suffixIcon);
9797
return (
98-
<ButtonCompWrapper disabled={props.disabled}>
98+
<ButtonCompWrapper $disabled={props.disabled}>
9999
<Link
100100
$animationStyle={props.animationStyle}
101101
ref={props.viewRef}

client/packages/lowcoder/src/comps/comps/buttonComp/scannerComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const ScannerTmpComp = (function () {
134134
};
135135

136136
return (
137-
<ButtonCompWrapper disabled={props.disabled}>
137+
<ButtonCompWrapper $disabled={props.disabled}>
138138
<Button100
139139
ref={props.viewRef}
140140
$buttonStyle={props.style}

client/packages/lowcoder/src/comps/comps/buttonComp/toggleButtonComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const ToggleTmpComp = (function () {
7272

7373
return (
7474
<ButtonCompWrapperStyled
75-
disabled={props.disabled}
75+
$disabled={props.disabled}
7676
$align={props.alignment}
7777
$showBorder={props.showBorder}
7878
$animationStyle={props.animationStyle}

0 commit comments

Comments
 (0)