Skip to content

Commit

Permalink
Merge pull request #6673 from jerolimov/odc-4364
Browse files Browse the repository at this point in the history
Bug 1879875: Fix that the Start Pipeline form is not always validated correctly
  • Loading branch information
openshift-merge-robot committed Sep 29, 2020
2 parents ce1ff4e + 1e1db5b commit fd087cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ const DropdownField: React.FC<DropdownFieldProps> = ({ label, helpText, required
aria-describedby={`${fieldId}-helper`}
onChange={(value: string) => {
props.onChange && props.onChange(value);
setFieldValue(props.name, value);
setFieldTouched(props.name, true);
// Validation is automatically done by the useFormikValidationFix above
setFieldValue(props.name, value, false);
setFieldTouched(props.name, true, false);
}}
/>
</FormGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ const PipelineWorkspacesSection: React.FC = () => {
setFieldValue(
`workspaces.${index}.data`,
VolumeTypes[type] === VolumeTypes.EmptyDirectory ? { emptyDir: {} } : {},
// Validation is automatically done by DropdownField useFormikValidationFix
false,
)
}
fullWidth
Expand Down

0 comments on commit fd087cc

Please sign in to comment.