Skip to content

Commit

Permalink
Merge pull request #26567 from storybookjs/valentin/fix-control-false
Browse files Browse the repository at this point in the history
Controls: Fix disable condition in ArgControl component
(cherry picked from commit b00a1e2)
  • Loading branch information
valentinpalkovic authored and storybook-bot committed Mar 19, 2024
1 parent 7b5d84c commit ab654d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/ui/blocks/src/components/ArgsTable/ArgControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export const ArgControl: FC<ArgControlProps> = ({ 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 ? (
<Link
href="https://storybook.js.org/docs/react/essentials/controls"
Expand Down

0 comments on commit ab654d0

Please sign in to comment.