question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

combined knobs default value @5.1.0

See original GitHub issue

Describe the bug We’ve been using a feature of Knobs addon since storybook@3. A feature the allowed us using one knob value in a different one

Steps To Reproduce

  1. Create an Object of strings, such as const BUTTON_MODIFIER = {A: 'a', B: 'b'}
  2. Create a story with a React component accepting an array prop
  3. use an array knob with combination of select knob
<Button
  customClassNames={array(
    'customClassNames', 
    [select('CSS BUTTON_MODIFIER', BUTTON_MODIFIER)]
  )}
/>

Expected behavior If a user selected a value from the select knob, it should be added to the array knob As mentioned, using it since storybook@3, screenshots are from storybook@5.0.11 https://prnt.sc/o1as57 https://prnt.sc/o1asi9

Actual Result storybook@^5.1 https://prnt.sc/o1atav

System:

  • OS: Ubuntu
  • Browser: Chromium, Firefox
  • Framework: react
  • Addons: knobs
  • Version: ^5.1.0 and also the “latest” 5.2.0-alpha.24

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:23 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
adriencacciacommented, Mar 19, 2020

Hi @stropho I managed to make it temporarily work with this solution https://github.com/storybookjs/storybook/issues/3855#issuecomment-540113248

0reactions
strophocommented, May 10, 2020

@adriencaccia thx for the message. I don’t feel comfortable with the solution as long as it is not documented anywhere. That way, the functionality could be removed just like that any time. Let’s hope for the best in version 6 🤞

Read more comments on GitHub >

github_iconTop Results From Across the Web

Control Parameters - Native Instruments
Sets the minimum and maximum display range of the level meters, with default ranges from 0 to 1000000. If the minimum values is...
Read more >
rsyslog Cookbook - Chef Supermarket
Installs and configures rsyslog to replace syslogd for client and/or server use. By default ... Default value is the previous cookbook version's value, ......
Read more >
@storybook/addon-controls | Yarn - Package Manager
Storybook Controls Addon. Storybook Controls gives you a graphical UI to interact with a component's arguments dynamically, without needing to code.
Read more >
libvirt releases
This is now implemented for QEMU domains too (see sched_core knob in qemu.conf), although not enabled by default, just yet. Improvements.
Read more >
Cisco ASR 9000 Series Aggregation Services Router Routing ...
For default limits, refer to BGP Default Limits. Discard Extra Paths ... The dmz-link-bandwidth knob is configured under eBGP neighbor configuration mode.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found