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(edgestack): broken parallel setting in create view [EE-7245] #11945

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

oscarzhou-portainer
Copy link
Collaborator

@oscarzhou-portainer oscarzhou-portainer commented Jun 13, 2024

Copy link
Contributor

@chiptus chiptus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, let's use formik solution

@@ -124,7 +124,11 @@ export function InnerForm({
<StaggerFieldset
isEdit={false}
values={values.staggerConfig}
onChange={(value) => setFieldValue('staggerConfig', value)}
onChange={(value) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace setFieldValue with setValues

onChange={newStaggerValues => 
   setValues(values => ({
				...values,
        stagerConfig: {
          ...values.staggerConfig,
          ...newStaggerValues
       }
   })
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

object.entries is a nice solution, but formik has support for this. calling setFieldValue doesn't stack, so we will get a few rerenders

Copy link
Contributor

@chiptus chiptus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants