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
THREESCALE-8979: Fix the issue with not being able to remove default plan #3131
THREESCALE-8979: Fix the issue with not being able to remove default plan #3131
Conversation
The whole
At the time I didn't remember why it was Anyway, I think the biggest problem is there was no 🥒 test for this. That should come first. |
Do you mean that this fix is not valid, and should be done in a different way? (in the Select component) |
Yes |
8eac080
to
02c379f
Compare
02c379f
to
f2b7cf0
Compare
@@ -77,8 +77,8 @@ const Select = <T extends IRecord>({ | |||
> | |||
{isLoading && <Spinner className="pf-u-ml-md" size="md" />} | |||
{/* TODO: id should be treated as a string */} | |||
{/* TODO: should it be `value={item.id > -1 ? item.id : ''}`? */} | |||
{item && <input name={name} type="hidden" value={item.id} />} | |||
{/* Controllers expect and empty string for some operations (such as unsetting the default plan) */} |
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.
{/* Controllers expect and empty string for some operations (such as unsetting the default plan) */} | |
{/* Controllers expect an empty string for some operations (such as unsetting the default plan) */} |
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.
🥒
What this PR does / why we need it:
Fix the issue with not being able to remove default plan.
Which issue(s) this PR fixes
Fixes https://issues.redhat.com/browse/THREESCALE-8979
Verification steps
Special notes for your reviewer:
In Flow there was an ignore message explaining why there was an empty string: https://github.com/3scale/porta/pull/2974/files#diff-5360738f38dabacb7a4d30fca57a8de39dd864cae351edae17bfe5c0b70fdae1R27
The ID of the default plan was changed from
''
to-1
in the Typescript PR: https://github.com/3scale/porta/pull/3054/files