Skip to content

Commit

Permalink
BugFix - Storage Size default to select-storage-size (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
Venus-Izadi authored Oct 15, 2020
1 parent 574ee36 commit 3893809
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,9 @@ Object {
<option
class=""
value=""
/>
>
Select storage size
</option>
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1142,10 +1142,9 @@ Object {
>
<option
class=""
data-cy="none"
value="none"
value=""
>
None
Select storage size
</option>
<option
class=""
Expand Down Expand Up @@ -1223,10 +1222,9 @@ Object {
>
<option
class=""
data-cy="none"
value="none"
value=""
>
None
Select storage size
</option>
<option
class=""
Expand Down
15 changes: 9 additions & 6 deletions src/components/engagement_form_fields/persistent_storage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ export function PersistentStorageFormField({
onChange={e => onChange('ocp_persistent_storage_size', e)}
value={engagement?.ocp_persistent_storage_size || ''}
>
{engagementFormConfig?.openshift_options?.persistent_storage?.options
?.length > 0 ? (
{[
<FormSelectOption
key={'undefined storage'}
label="Select storage size"
value={undefined}
/>,
].concat(
engagementFormConfig?.openshift_options?.persistent_storage?.options?.map(
(option: any, index: any) => (
<FormSelectOption
Expand All @@ -56,10 +61,8 @@ export function PersistentStorageFormField({
data-cy={option.value}
/>
)
)
) : (
<FormSelectOption label={''} value={''} />
)}
))
}
</FormSelect>
</FormGroup>
);
Expand Down
4 changes: 0 additions & 4 deletions src/schemas/fixtures/engagement_form_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@
}
],
"options": [
{
"label": "None",
"value": "none"
},
{
"label": "50GB",
"value": "50G"
Expand Down

0 comments on commit 3893809

Please sign in to comment.