Knobs update on local story state update
See original GitHub issueHi,
Maybe I’m wrong but it seems that knobs addon can’t be updated when using args update. To give you some example I have some sample code which is:
.add('with storybook 6 using hooks', () => {
const [args, updateArgs] = useArgs(false);
console.log('args', args);
const knobs = {
name: text('name', 'name'),
title: text('title', 'Input title'),
isDisabled: boolean('isDisabled', false),
//isChecked: boolean('isChecked', args.isChecked || false), // when using this update is blocked
customClasses: text('customClasses', 'custom-class')
};
return (<InputCheckbox
{...knobs}
{...otherActions}
isChecked={args.isChecked || false}
onChange={(isChecked) => {
updateArgs({ isChecked });
}}/>);
}
)
old knobs are working fine for me but updating isChecked
knob from args
doesn’t trigger any change, how can I make it work? As we have many stories to update I would appreciate a simple solution.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Storybook Knobs not updating - Stack Overflow
I use knobs for both, it works fine of the simple button but it dose not update the larger component (The withInfo addon...
Read more >Knobs Addon | Storybook: Frontend workshop for UI ...
Storybook Addon Knobs allow you to edit props dynamically using the Storybook UI. You can also use Knobs as a dynamic variable inside...
Read more >Crews battling blaze at Meridian Township apartment building
No one was injured in the fire at Knob Hill Apartments on Knob Hill Drive, west of Okemos Road, which began around 11...
Read more >The State News
Firefighters combat fire at Knob Hill Apartments in Okemos, no reported injuries ... Live updates of Michigan State football's early signing day period....
Read more >Adding new knobs and pulls is an easy, inexpensive way to ...
Adding new knobs and pulls is an easy, inexpensive way to update rooms ... are gaining in popularity among her local clients.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Klaudia-Brysiewicz did you try:
Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!