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

fix(ExpandableTile): fix devtool warning message for handleClick prop #10460

Merged
merged 2 commits into from
Jan 18, 2022

Conversation

yaoterry
Copy link
Contributor

@yaoterry yaoterry commented Jan 18, 2022

Closes #

fix the warning message:
Warning: React does not recognize the handleClick prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase handleclick instead. If you accidentally passed it from a parent component, remove it from the DOM element.
at button
at ExpandableTile (webpack-internal:///./src/components/Tile/Tile.js:489:5)
at div
at div
at Container (webpack-internal:///./.storybook/Container.js:27:20)
at unboundStoryFn (webpack-internal:///../../node_modules/@storybook/store/dist/esm/prepareStory.js:265:12)
at ErrorBoundary (webpack-internal:///../../node_modules/@storybook/react/dist/esm/client/preview/render.js:120:5)

Changelog

New

  • N/A

Changed

  • make the handleClick property is not passing down to the dom node as it's not in the ...rest props for the button element with this fix..

Removed

  • N/A

Testing / Reviewing

install react dev tool chrom extension and make sure there is no warning for code like
<ExpandableTile handleClick={()=> console.log('i was clicked')} >

<div style={{ height: '200px' }}>Above the fold content here


<div style={{ height: '400px' }}>
Below the fold content here



@yaoterry yaoterry requested a review from a team as a code owner January 18, 2022 04:05
@yaoterry yaoterry requested review from abbeyhrt and dakahn January 18, 2022 04:05
@netlify
Copy link

netlify bot commented Jan 18, 2022

✔️ Deploy Preview for carbon-react-next ready!

🔨 Explore the source changes: 0a639bc

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/61e746130ae4690007127eaa

😎 Browse the preview: https://deploy-preview-10460--carbon-react-next.netlify.app

@netlify
Copy link

netlify bot commented Jan 18, 2022

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: 0a639bc

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/61e74613b4596d0008c40622

😎 Browse the preview: https://deploy-preview-10460--carbon-components-react.netlify.app

@netlify
Copy link

netlify bot commented Jan 18, 2022

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: 0a639bc

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/61e74613ab37ed0008f98d85

😎 Browse the preview: https://deploy-preview-10460--carbon-elements.netlify.app

@kodiakhq kodiakhq bot merged commit f0b689f into carbon-design-system:main Jan 18, 2022
@abbeyhrt abbeyhrt mentioned this pull request Jan 27, 2022
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants