Storybook: Addon-docs: DocsPage Controls don't update iframe stories

Created on 12 Aug 2020  路  12Comments  路  Source: storybookjs/storybook

Controls don't update iframed stories on the Docs tab, but do update on the Canvas tab.

controls-bug

For frameworks that support inline rendering (react, vue, web-components, etc.), making the docs stories render inline is a workaround.

P1 controls docs angular ember argstable bug has workaround todo

Most helpful comment

So for me i also have this issue with angular -> here is an example repo:
https://github.com/flobiber/storybook-angular

All 12 comments

i was experiencing something similar to this with react

I've been observing controls not updating the render on the canvas tab, with react

@michaelbayday @petermikitsh do either of you have a repro you can share? haven't seen that yet.

Reproduction is now showing the controls and showing the issue
https://github.com/blowsie/storybook-vue

The problem is the story:

https://github.com/blowsie/storybook-vue/blob/master/src/TestComponent.stories.js#L11

Try:

const Template = (args, { argTypes }) => ({

Fixed my issue, thanks!

@shilman No repro; my observation was a hiccup on my upgrade from 5 to 6. My apologies!

So for me i also have this issue with angular -> here is an example repo:
https://github.com/flobiber/storybook-angular

Scouring around, this workaround got my Docs page re-rendering with changes to controls (for React implementations, but perhaps could also work for Vue?):

import { parameters } from "@storybook/addon-docs/dist/frameworks/react/config";
import { addParameters } from '@storybook/react';
import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks';

addParameters({
  docs: {
    ...parameters.docs,
    container: DocsContainer,
    page: DocsPage,
  },
  controls: {
    expanded: true,
  }
});

Note the import and spread of parameters.docs

@jamesjenkinsjr if you needed to do this it's due to a configuration problem and not related to the iframe issue here. I just want to clarify for anybody who stumbles across this to avoid confusion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomitrescak picture tomitrescak  路  3Comments

zvictor picture zvictor  路  3Comments

Jonovono picture Jonovono  路  3Comments

shilman picture shilman  路  3Comments

purplecones picture purplecones  路  3Comments