mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
ADD a STORY_UNCHANGED event
Emit when the STORY_RENDER event is received but nothing has changed, so we aren't re-rendering.
This commit is contained in:
parent
e48631eb26
commit
3f3f0afb92
@ -8,6 +8,7 @@ enum events {
|
||||
APPLY_SHORTCUT = 'applyShortcut',
|
||||
STORY_ADDED = 'storyAdded',
|
||||
STORY_CHANGED = 'storyChanged',
|
||||
STORY_UNCHANGED = 'storyUnchanged',
|
||||
FORCE_RE_RENDER = 'forceReRender',
|
||||
REGISTER_SUBSCRIPTION = 'registerSubscription',
|
||||
STORY_INIT = 'storyInit',
|
||||
|
@ -123,6 +123,7 @@ export default function start(render, { decorateStory } = {}) {
|
||||
kind === previousKind &&
|
||||
previousStory === name
|
||||
) {
|
||||
addons.getChannel().emit(Events.STORY_UNCHANGED, id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user