You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a function is declared in a component's story with the same name as a function in the component and passed as props, the implementation of the function in the story overrides the implementation in the component. Private functions in the component are also overridden.
** Disclaimer** This information might be inaccurate, due to it being generated automatically
This issue likely stems from how Angular components are rendered in Storybook. The relevant code is probably in the @storybook/angular package, specifically in the component rendering logic. Check renderers/angular/src/render.ts for the component rendering process. The issue might be in how props are applied to the component, possibly overwriting methods instead of merging them. A potential fix could involve modifying the prop application logic to preserve existing component methods when story props are applied.
Describe the bug
When a function is declared in a component's story with the same name as a function in the component and passed as props, the implementation of the function in the story overrides the implementation in the component. Private functions in the component are also overridden.
Reproduction link
https://stackblitz.com/edit/github-ybftbv?file=src%2Fstories%2Fbutton.component.ts
Reproduction steps
npm run storybook
System
Additional context
No response
The text was updated successfully, but these errors were encountered: