From ab654d0d05d2718c273b043f7f0a026e2903eed2 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 19 Mar 2024 12:24:46 +0100 Subject: [PATCH] Merge pull request #26567 from storybookjs/valentin/fix-control-false Controls: Fix disable condition in ArgControl component (cherry picked from commit b00a1e27599265e8c4369d3e1c78d1a75824b7b5) --- code/ui/blocks/src/components/ArgsTable/ArgControl.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ui/blocks/src/components/ArgsTable/ArgControl.tsx b/code/ui/blocks/src/components/ArgsTable/ArgControl.tsx index 6d51fe88d318..ed8ee973d11e 100644 --- a/code/ui/blocks/src/components/ArgsTable/ArgControl.tsx +++ b/code/ui/blocks/src/components/ArgsTable/ArgControl.tsx @@ -65,8 +65,8 @@ export const ArgControl: FC = ({ row, arg, updateArgs, isHovere const onBlur = useCallback(() => setFocused(false), []); const onFocus = useCallback(() => setFocused(true), []); - if (!control || control.disabled) { - const canBeSetup = control?.disabled !== true && row?.type?.name !== 'function'; + if (!control || control.disable) { + const canBeSetup = control?.disable !== true && row?.type?.name !== 'function'; return isHovered && canBeSetup ? (