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
  • Loading branch information
valentinpalkovic authored Mar 19, 2024
2 parents 79abc6c + ad373b9 commit b00a1e2
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 b00a1e2

Please sign in to comment.