Skip to content

Commit 5331828

Browse files
Merge pull request #1664 from iamfaran/fix/1634-step-control
[FIX] #1634 Step Control Disabled Click
2 parents adacf37 + 4859b50 commit 5331828

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ let StepControlBasicComp = (function () {
151151
const onChange = (index: number) => {
152152
if (props.selectable == false) return;
153153
const newIndex = Math.max(0, index);
154+
if (props.options[newIndex]?.disabled) {
155+
return;
156+
}
154157
setCurrent(newIndex);
155158
if (props.options[newIndex]?.value !== undefined) {
156159
props.value.onChange(newIndex + 1 + ""); // Convert back to 1-based index for display.
@@ -198,6 +201,7 @@ let StepControlBasicComp = (function () {
198201
title={option.label}
199202
subTitle={option.subTitle}
200203
description={option.description}
204+
disabled={option.disabled}
201205
status={option.status as "error" | "finish" | "wait" | "process" | undefined}
202206
icon={props.showIcons && hasIcon(option.icon) && option.icon || undefined}
203207
/>

0 commit comments

Comments
 (0)