Skip to content

Commit

Permalink
Add check for table content type
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Mar 7, 2024
1 parent 9daf6bf commit 85e7f18
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,17 @@ export const AssociatedObjectsTab: React.FC<AssociatedObjectsTabProps> = ({
sortable: true,
'data-test-subj': 'nameCell',
render: (name: string, item: AssociatedObject) => (
<EuiLink onClick={() => renderAssociatedObjectsDetailsFlyout(item)}>{name}</EuiLink>
<EuiLink
onClick={() => {

Check warning on line 180 in public/components/datasources/components/manage/associated_objects/associated_objects_tab.tsx

View check run for this annotation

Codecov / codecov/patch

public/components/datasources/components/manage/associated_objects/associated_objects_tab.tsx#L180

Added line #L180 was not covered by tests
if (item.type === 'Table') {
renderAssociatedObjectsDetailsFlyout(item);
} else {
renderAccelerationDetailsFlyout(item.accelerations[0]);

Check warning on line 184 in public/components/datasources/components/manage/associated_objects/associated_objects_tab.tsx

View check run for this annotation

Codecov / codecov/patch

public/components/datasources/components/manage/associated_objects/associated_objects_tab.tsx#L182-L184

Added lines #L182 - L184 were not covered by tests
}
}}
>
{name}
</EuiLink>
),
},
{
Expand Down

0 comments on commit 85e7f18

Please sign in to comment.