mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-31 05:03:21 +08:00
Merge pull request #6395 from mortal94/fix-set-options-on-load
fix: Set custom options on first load
This commit is contained in:
commit
cfacc56856
@ -142,6 +142,10 @@ class ManagerProvider extends Component<Props, State> {
|
||||
|
||||
api.on(SET_STORIES, (data: { stories: StoriesRaw }) => {
|
||||
api.setStories(data.stories);
|
||||
const options = storyId
|
||||
? api.getParameters(storyId, 'options')
|
||||
: api.getParameters(Object.keys(data.stories)[0], 'options');
|
||||
api.setOptions(options);
|
||||
});
|
||||
api.on(
|
||||
SELECT_STORY,
|
||||
|
Loading…
x
Reference in New Issue
Block a user