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

Merged
merged 3 commits into from
Jul 28, 2024

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 :)

@oscarzhou-portainer oscarzhou-portainer merged commit 6486a5d into develop Jul 28, 2024
26 checks passed
@oscarzhou-portainer oscarzhou-portainer deleted the fix/EE-7245/parallel-setting-broken branch July 28, 2024 21:42
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.

3 participants