diff --git a/lib/preview-web/src/PreviewWeb.tsx b/lib/preview-web/src/PreviewWeb.tsx index 1c17dd62f19d..87b41edfdc7c 100644 --- a/lib/preview-web/src/PreviewWeb.tsx +++ b/lib/preview-web/src/PreviewWeb.tsx @@ -529,6 +529,17 @@ export class PreviewWeb { unboundStoryFn, }; + // Populate args from url to ArgsTable controls. + if (initial) { + const { args, storySpecifier } = this.urlStore.selectionSpecifier; + if (Object.keys(args).length > 0) { + this.channel.emit(Events.STORY_ARGS_UPDATED, { + storyId: storySpecifier, + updatedArgs: args, + }); + } + } + try { if (!this.renderToDOM) { throw new Error(dedent`