Skip to content

Commit

Permalink
Fix flashing banner when creating pipeline (elastic#199786)
Browse files Browse the repository at this point in the history
Closes [elastic#197810](elastic#197810)

## Summary
The `isValid` verification wasn't taken into account if the form was in
`isSubmitting` state.

![flashing
banner](https://github.com/user-attachments/assets/6f9173ff-7f2c-46a5-99cc-31fdd699404e)

(cherry picked from commit 48158d4)
  • Loading branch information
SoniaSanzV committed Nov 19, 2024
1 parent 74d2099 commit 5d96825
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const PipelineForm: React.FunctionComponent<PipelineFormProps> = ({
<Form
form={form}
data-test-subj="pipelineForm"
isInvalid={form.isSubmitted && !form.isValid}
isInvalid={form.isSubmitted && !form.isValid && !form.isSubmitting}
error={form.getErrors()}
>
{/* Request error */}
Expand Down Expand Up @@ -244,7 +244,6 @@ export const PipelineForm: React.FunctionComponent<PipelineFormProps> = ({
</EuiButtonEmpty>
</EuiFlexItem>
</EuiFlexGroup>

{/* ES request flyout */}
{isRequestVisible ? (
<PipelineRequestFlyout
Expand Down

0 comments on commit 5d96825

Please sign in to comment.