fix(Modal): fix Formik bug in Modal#9797
Conversation
|
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 80d4923 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/615efed568df9e0007cf228a 😎 Browse the preview: https://deploy-preview-9797--carbon-react-next.netlify.app |
|
DCO Assistant Lite bot All contributors have signed the DCO. |
|
I have read the DCO document and I hereby sign the DCO. |
| aria-label={iconDescription} | ||
| ref={this.button}> | ||
| ref={this.button} | ||
| > |
There was a problem hiding this comment.
These changes throughout this file seemed to be added via husky during the commit process-- hopefully they fit with this repo's conventions.
|
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 80d4923 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/615efed5e825140007eb3a85 😎 Browse the preview: https://deploy-preview-9797--carbon-components-react.netlify.app |
|
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 80d4923 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/615efed5569b1800085a4f2c 😎 Browse the preview: https://deploy-preview-9797--carbon-elements.netlify.app |
aledavila
left a comment
There was a problem hiding this comment.
Looks like this completely breaks modal as I'm not seeing in the preview at all.
- Remove SecondaryButtonSet sub-component (causing re-renders w/ Formik)
8f2ad2e to
d0849c4
Compare
|
Interesting, the preview excludes the following components that appear on https://react.carbondesignsystem.com/: The preview also includes a few components that don't exist in the I'm not sure why this might be... I've rebased this PR on the latest |
|
Is there a way to get netlify to run again with the latest? Or does it do that automatically? |
|
Sorry for the confusion @ColbyJohnIBM, there are three different deploy previews built for each pull request:
The Netlify comment body will indicate which link is for which preview. These deploys will all automatically update/re-deploy to the same URL when new commits are pushed to the pull request, or the pull request is updated with latest from |
|
I'm seeing the preview work properly, button variations (0/1/2/3) are all rendering as expected. cc: @aledavila |
|
@ColbyJohnIBM let us know if you need a hand running |

Closes #9523
Breaking the secondary buttons out into their own sub-component (here) created the bug described in the above issue. I understand that this was probably done for readability / maintainability, but it also is causing additional re-renders when used with Formik that are resulting in incorrect behavior.
Changelog
Changed
Removed
Testing / Reviewing
I tested this by linking my local version of Carbon to my local version of our application, but a more generic way to test would be to run this CodeSandbox locally, linked to a local version of Carbon on this branch.