mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Enterprise Search] Fix some minor React errors (#150700)
## Summary This fixes two minor React errors that were showing up in the console.
This commit is contained in:
parent
38cb7b3fd2
commit
fc2e95cab1
3 changed files with 10 additions and 6 deletions
|
@ -46,6 +46,7 @@ export const ButtonGroup: React.FC<Props> = ({ onChange, options, selected }) =>
|
|||
'buttonGroupOption--selected': isSelected,
|
||||
})}
|
||||
grow={false}
|
||||
key={index}
|
||||
onClick={() => {
|
||||
onChange(option);
|
||||
}}
|
||||
|
|
|
@ -52,14 +52,17 @@ export const NameAndDescriptionStats: React.FC = () => {
|
|||
description: <EditDescription label={NAME_LABEL} onClick={() => setIsFlyoutVisible(true)} />,
|
||||
isLoading: hideStats,
|
||||
title: indexData.connector.name,
|
||||
descriptionElement: 'div',
|
||||
titleElement: 'div',
|
||||
},
|
||||
{
|
||||
description: (
|
||||
<EditDescription label={DESCRIPTION_LABEL} onClick={() => setIsFlyoutVisible(true)} />
|
||||
),
|
||||
descriptionElement: 'div',
|
||||
isLoading: hideStats,
|
||||
title: <EuiText size="s">{indexData.connector.description || ''}</EuiText>,
|
||||
titleElement: 'p',
|
||||
titleElement: 'div',
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -131,17 +131,17 @@ export const PipelineJSONBadges: React.FC = () => {
|
|||
}
|
||||
const badges: JSX.Element[] = [];
|
||||
if (isManagedPipeline(pipeline)) {
|
||||
badges.push(<ManagedPipelineBadge />);
|
||||
badges.push(<ManagedPipelineBadge key="managed-pipeline" />);
|
||||
} else {
|
||||
badges.push(<UnmanagedPipelineBadge />);
|
||||
badges.push(<UnmanagedPipelineBadge key="unmanaged-pipeline" />);
|
||||
}
|
||||
if (pipelineName === DEFAULT_PIPELINE_NAME) {
|
||||
badges.push(<SharedPipelineBadge />);
|
||||
badges.push(<SharedPipelineBadge key="shared-pipeline" />);
|
||||
}
|
||||
if (pipelineName?.endsWith('@ml-inference')) {
|
||||
badges.push(<MlInferenceBadge />);
|
||||
badges.push(<MlInferenceBadge key="inference-pipeline" />);
|
||||
} else if (pipelineName?.includes(indexName)) {
|
||||
badges.push(<IndexPipelineBadge />);
|
||||
badges.push(<IndexPipelineBadge key="index-pipeline" />);
|
||||
}
|
||||
return <EuiBadgeGroup gutterSize="s">{badges}</EuiBadgeGroup>;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue