-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Adjust forms to include Rich Parameters #5856
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
Conversation
| size="small" | ||
| disabled={disabled} | ||
| placeholder={parameter.default_value} | ||
| value={parameterValue} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error usually happens when the value changes from string to undefined. Many times, having undefined values is a "bug" warning but in a few cases, it is ok so what you have to do is pass an empty string as a fallback:
value={parameterValue ?? ""}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I introduced the parameterValue as I wasn't able to fix it with formik. It looks like formik has troubles with understanding the concept of array of object, and for some reason, the input goes undefined. I will look into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so maybe the getFormHelpers has a bug 🤔
|
Hey @BrunoQuaresma! I'm done with the implementation, but I need to increase test coverage for Update workspace. I will do this tomorrow, but I appreciate any comments on the code in the mean time. This should be reviewable. PS. I apologize for the PR size... |
BrunoQuaresma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FE code looks very good to me, congrats! I'm going to run a QA before approving it.
BrunoQuaresma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, if you already did that and you are confident, feel free to merge it!
Related: #5574
Changes:
http://localhost:3000/templates/docker-2/workspace?param.Compute%20instances=7