diff --git a/src/common/components/cards/instance-details-group.tsx b/src/common/components/cards/instance-details-group.tsx index 54c31bb402c..7d181aeaa89 100644 --- a/src/common/components/cards/instance-details-group.tsx +++ b/src/common/components/cards/instance-details-group.tsx @@ -26,7 +26,7 @@ export type InstanceDetailsGroupProps = { rule: CardRuleResult; userConfigurationStoreData: UserConfigurationStoreData; targetAppInfo: TargetAppData; - cardSelectionMessageCreator: CardSelectionMessageCreator; + cardSelectionMessageCreator?: CardSelectionMessageCreator; }; export const InstanceDetailsGroup = NamedFC( diff --git a/src/common/components/cards/instance-details.tsx b/src/common/components/cards/instance-details.tsx index 9bc91ed1163..a3f32e934fd 100644 --- a/src/common/components/cards/instance-details.tsx +++ b/src/common/components/cards/instance-details.tsx @@ -33,7 +33,7 @@ export type InstanceDetailsProps = { userConfigurationStoreData: UserConfigurationStoreData; targetAppInfo: TargetAppData; rule: UnifiedRule; - cardSelectionMessageCreator: CardSelectionMessageCreator; + cardSelectionMessageCreator?: CardSelectionMessageCreator; }; export const InstanceDetails = NamedFC('InstanceDetails', props => { @@ -63,7 +63,7 @@ export const InstanceDetails = NamedFC('InstanceDetails', const toggleSelectHandler = (event: React.SyntheticEvent): void => { event.stopPropagation(); - cardSelectionMessageCreator.toggleCardSelection(result.ruleId, result.uid, event); + cardSelectionMessageCreator?.toggleCardSelection(result.ruleId, result.uid, event); }; const hiddenButton = React.useRef(null); @@ -91,7 +91,7 @@ export const InstanceDetails = NamedFC('InstanceDetails', {renderCardRowsForPropertyBag(result.resolution, props)} - {isHighlightSupported && ( + {isHighlightSupported && cardSelectionMessageCreator !== undefined && (