Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Angular] Actions triggered multiple times after properties changed through Controls add-on #12507

Closed
daalexandre opened this issue Sep 17, 2020 · 3 comments

Comments

@daalexandre
Copy link

Describe the bug

After a property is changed on a component through the Controls panel and an action is triggered, the amount o events displayed on the Actions panel is increased by 1 for each property change.

To Reproduce

  1. Create a new angular project and initialize Storybook on it.
  2. Start storybook
  3. On the side panel, select Button > Primary
  4. Access the Controls tab
  5. Change any property i.e label = "1234567"
  6. Go back to Actions panel and click the Button.

Expected behavior
Events should be triggered only once.

Screenshots
image
image

Additional context
Angular CLI: 10.1.1
Node: 10.16.3
OS: win32 x64

@Marklb
Copy link
Member

Marklb commented Sep 18, 2020

A new subscription is being created every time props change, without checking if it needs a new subscription or unsubscribing the previous if a new one does need to be created.

I submitted a PR that should fix it.

@shilman
Copy link
Member

shilman commented Sep 24, 2020

Jeepers creepers!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.1.0-alpha.15 containing PR #12514 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Sep 24, 2020
@shilman
Copy link
Member

shilman commented Sep 26, 2020

Crikey!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.22 containing PR #12514 that references this issue. Upgrade today to try it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants