Skip to content

Commit

Permalink
Disable integration set up button if invalid (opensearch-project#1152)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiddis authored Oct 23, 2023
1 parent 095bdfa commit 3aefc10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,8 @@ exports[`Integration Setup Page Renders integration setup page as expected 1`] =
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<button
class="euiButton euiButton--primary euiButton--fill"
class="euiButton euiButton--primary euiButton--fill euiButton-isDisabled"
disabled=""
type="button"
>
<span
Expand Down Expand Up @@ -885,6 +886,7 @@ exports[`Integration Setup Page Renders integration setup page as expected 1`] =
className="euiFlexItem euiFlexItem--flexGrowZero"
>
<EuiButton
disabled={true}
fill={true}
iconSide="right"
iconType="arrowRight"
Expand All @@ -893,19 +895,19 @@ exports[`Integration Setup Page Renders integration setup page as expected 1`] =
>
<EuiButtonDisplay
baseClassName="euiButton"
disabled={false}
disabled={true}
element="button"
fill={true}
iconSide="right"
iconType="arrowRight"
isDisabled={false}
isDisabled={true}
isLoading={false}
onClick={[Function]}
type="button"
>
<button
className="euiButton euiButton--primary euiButton--fill"
disabled={false}
className="euiButton euiButton--primary euiButton--fill euiButton-isDisabled"
disabled={true}
onClick={[Function]}
style={
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
EuiForm,
EuiFormRow,
EuiLoadingDashboards,
EuiModal,
EuiPage,
EuiPageBody,
EuiPageContent,
Expand Down Expand Up @@ -320,6 +319,7 @@ export function SetupBottomBar({
iconType="arrowRight"
iconSide="right"
isLoading={loading}
disabled={config.displayName.length < 1 || config.connectionDataSource.length < 1}
onClick={async () => {
setLoading(true);

Expand Down

0 comments on commit 3aefc10

Please sign in to comment.