Skip to content

Commit

Permalink
[MD] skip data source view when pick default
Browse files Browse the repository at this point in the history
Signed-off-by: Kristen Tian <tyarong@amazon.com>
  • Loading branch information
kristenTian committed Oct 14, 2022
1 parent 115105a commit a4be06c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ export const Header: React.FC<HeaderProps> = ({
<EuiFlexGroup>
<EuiFlexItem>
<EuiForm isInvalid={isInputInvalid}>
{dataSourceEnabled
{dataSourceEnabled && !!dataSourceRef?.title
? renderDataSourceAndIndexPatternInput(
isInputInvalid,
errors,
characterList,
query,
onQueryChanged,
dataSourceRef!
dataSourceRef.title
)
: renderIndexPatternInput(
isInputInvalid,
Expand Down Expand Up @@ -216,7 +216,7 @@ const renderDataSourceAndIndexPatternInput = (
characterList: string,
query: string,
onQueryChanged: (e: React.ChangeEvent<HTMLInputElement>) => void,
dataSourceRef: DataSourceRef
dataSourceTitle: string
) => {
return (
<EuiFlexGroup gutterSize="none">
Expand All @@ -239,7 +239,7 @@ const renderDataSourceAndIndexPatternInput = (
defaultMessage: 'Data source name',
}
)}
value={dataSourceRef!.title}
value={dataSourceTitle}
isInvalid={isInputInvalid}
disabled={true}
data-test-subj="createIndexPatternDataSourceName"
Expand Down

0 comments on commit a4be06c

Please sign in to comment.