diff --git a/code/addons/controls/src/manager.tsx b/code/addons/controls/src/manager.tsx index f76dfaf83e9a..38a3b31314f5 100644 --- a/code/addons/controls/src/manager.tsx +++ b/code/addons/controls/src/manager.tsx @@ -9,7 +9,9 @@ addons.register(ADDON_ID, (api: API) => { addons.addPanel(ADDON_ID, { title() { const rows = useArgTypes(); - const controlsCount = Object.values(rows).filter((argType) => argType?.control).length; + const controlsCount = Object.values(rows).filter( + (argType) => argType?.control && !argType?.table?.disable + ).length; const suffix = controlsCount === 0 ? '' : ` (${controlsCount})`; return `Controls${suffix}`; }, diff --git a/code/addons/controls/template/stories/disable.stories.ts b/code/addons/controls/template/stories/disable.stories.ts index 4c597178fb67..f95160a034c9 100644 --- a/code/addons/controls/template/stories/disable.stories.ts +++ b/code/addons/controls/template/stories/disable.stories.ts @@ -18,5 +18,7 @@ export const DisableTable = { export const DisableControl = { args: { a: 'a', b: 'b' }, - b: { control: { disable: true } }, + argTypes: { + b: { control: { disable: true } }, + }, };