Hey everyone, I added a story with an inline onClick handler and in the Docs tab when I view the code the inline function is stripped out. We are using transformSource to manipulate the code that is returned in the Code tab, however I've checked and these inline functions appear to be getting stripped out beforehand so transformSource is having no affect on this.
I've attached a screenshot of what is being rendered, but basically it is rendering the onClick like so:
onClick={() => {}}
The behavior I'm expecting is that the the onClick would be rendered as it was passed in.
onClick={() => {
document.querySelector('rds-panel').toggle();
}}
Anyone have ideas as to why this may be happening? I have been unsuccessful finding documentation around this and my Google-fu has also been inadequate so far.
Current Storybook dependencies:
"@storybook/addon-a11y": "^6.5.14",
"@storybook/addon-actions": "^6.5.14",
"@storybook/addon-docs": "^6.5.14",
"@storybook/addon-essentials": "~6.5.14",
"@storybook/addon-interactions": "^6.5.14",
"@storybook/addon-links": "^6.5.14",
"@storybook/addon-viewport": "^6.5.14",
"@storybook/addons": "^6.5.14",
"@storybook/api": "^6.5.14",
"@storybook/builder-webpack5": "^6.5.14",
"@storybook/components": "^6.5.14",
"@storybook/core-events": "^6.5.14",
"@storybook/core-server": "^6.5.14",
"@storybook/jest": "^0.0.10",
"@storybook/manager-webpack5": "^6.5.14",
"@storybook/react": "~6.5.14",
"@storybook/testing-library": "^0.0.13",
"storybook-addon-designs": "^6.3.1",
"storybook-addon-docs-tabs": "^1.0.3",
"storybook-addon-playroom": "^3.0.2",
"storybook-dark-mode": "^2.0.4",
"storybook-docs-toc": "^1.7.0",