mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] Fixes display of job group badges in recognizer wizard (#101775)
This commit is contained in:
parent
7b51debbbb
commit
0f5620e5c4
2 changed files with 8 additions and 9 deletions
|
@ -51,9 +51,9 @@ export const EditJob: FC<EditJobProps> = ({ job, jobOverride, existingGroupIds,
|
|||
);
|
||||
|
||||
const handleValidation = () => {
|
||||
const jobGroupsValidationResult =
|
||||
formState.jobGroups ??
|
||||
[].map((group) => groupValidator(group)).filter((result) => result !== null);
|
||||
const jobGroupsValidationResult = (formState.jobGroups ?? [])
|
||||
.map((group) => groupValidator(group))
|
||||
.filter((result) => result !== null);
|
||||
|
||||
setValidationResult({
|
||||
jobGroups: jobGroupsValidationResult,
|
||||
|
|
|
@ -87,12 +87,11 @@ export const JobItem: FC<JobItemProps> = memo(
|
|||
</EuiText>
|
||||
|
||||
<EuiFlexGroup wrap responsive={false} gutterSize="xs">
|
||||
{jobGroups ??
|
||||
[].map((group) => (
|
||||
<EuiFlexItem grow={false} key={group}>
|
||||
<EuiBadge color={tabColor(group)}>{group}</EuiBadge>
|
||||
</EuiFlexItem>
|
||||
))}
|
||||
{(jobGroups ?? []).map((group) => (
|
||||
<EuiFlexItem grow={false} key={group}>
|
||||
<EuiBadge color={tabColor(group)}>{group}</EuiBadge>
|
||||
</EuiFlexItem>
|
||||
))}
|
||||
</EuiFlexGroup>
|
||||
|
||||
{setupResult && setupResult.error && (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue