-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addon-controls - Disabling controls for a component does not disable them on docsPage #12345
Comments
How to completely hide control for prop from Controls pane? |
How can we hide a property from the controls page? |
disabling a single row export default {
title: ...,
component: ...,
argTypes: {
foo: { table: { disable: true } }
},
} |
How to disable controls for a story in MDX? |
For a component:
For a story:
|
Is it possible to do the opposite? I mean, I set the controls to hide by default and then enable what I want to see? |
In MDX the ArgsTable block has an include prop that does what you want. But not for the other use case unfortunately @FilipMessa |
An addition to this, is there a way to disable the controls, but still have them shown? I have a boolean I always want to be true in a curtain state and I want to show its supposed to be true when displaying this component. |
@rayzoor12 it's an open issue #12693 |
is there a way to disable all controls for a story? (without having to disable one by one with table: {disable:true}). I want to have one interactive story (with controls) and the other stories just as read only use cases. |
@chalovega-cs I think you can filter all of them like this: https://storybook.js.org/docs/react/essentials/controls#filtering-controls |
Hi @shilman, How can I conditionally disable a control in Storybook based on the value of another argument? |
@JokerDang unfortunately you can't |
No the PR was closed without merging |
Possible workaround: in export const parameters = {
controls: {
exclude: /^.*?/
},
}; |
Describe the bug
When I set the parameter for controls to disabled, the
Controls
tab disappears, but controls are still present on thedocsPage
.To Reproduce
Steps to reproduce the behavior:
*.stories.js
file (maybe MDX too, but I have only verified this on*.stories.js
), set the export default as such:MyGreatComponent
Controls
tab is no longer visible.Docs
tab.Expected behavior
When I disable controls for a component, I expect both the controls tab to disappear AND the controls column on the
docsPage
to disappear, as well.System:
The text was updated successfully, but these errors were encountered: