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: use valid default formik form values MAASENG-2099 #5096

Conversation

petermakowski
Copy link
Contributor

@petermakowski petermakowski commented Aug 16, 2023

Done

  • fix: FormikField null values MAASENG-2099
    • explicitly disallow null values in formik initialValues

QA

QA steps

  • Open src/app/machines/views/MachineDetails/MachineConfiguration/PowerForm/PowerForm.tsx
  • replace line 97 with: powerType: machine.power_type,
  • Verify that a TypeError is thrown: "Type 'null' is not assignable to type 'InputFieldValue'."

Fixes

Fixes: MAASENG-2099

@webteam-app
Copy link

Demo starting at https://maas-ui-5096.demos.haus

@petermakowski petermakowski force-pushed the handle-formik-form-null-values-MAASENG-2099 branch from 7455b92 to 340e3b5 Compare August 16, 2023 11:44
@petermakowski petermakowski force-pushed the handle-formik-form-null-values-MAASENG-2099 branch from 340e3b5 to cf73ff0 Compare August 16, 2023 11:47
@petermakowski petermakowski marked this pull request as ready for review August 16, 2023 12:28
@petermakowski petermakowski changed the title fix: FormikField null values MAASENG-2099 fix: use valid default formik form values MAASENG-2099 Aug 16, 2023
Copy link
Contributor

@Jay-Topher Jay-Topher left a comment

Choose a reason for hiding this comment

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

Looks good

@petermakowski petermakowski merged commit 9469eb7 into canonical:main Aug 16, 2023
4 checks passed
@petermakowski petermakowski deleted the handle-formik-form-null-values-MAASENG-2099 branch August 16, 2023 13:50
@petermakowski petermakowski restored the handle-formik-form-null-values-MAASENG-2099 branch May 9, 2024 10:21
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