Storybook: [Angular] Actions triggered multiple times after properties changed through Controls add-on

Created on 17 Sep 2020  路  3Comments  路  Source: storybookjs/storybook

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

P1 controls angular bug

Most helpful comment

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.

All 3 comments

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.

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.

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wahengchang picture wahengchang  路  3Comments

rpersaud picture rpersaud  路  3Comments

zvictor picture zvictor  路  3Comments

MrOrz picture MrOrz  路  3Comments

tlrobinson picture tlrobinson  路  3Comments