From d54d6d29dc4e802d5cec37ac9a320182c2c96cb2 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Mon, 30 Dec 2019 10:36:36 +0300 Subject: [PATCH] problems: fix tag removal (list layout) --- src/panel-triggers/components/AlertList/AlertCard.tsx | 6 +++--- src/panel-triggers/components/AlertList/AlertList.tsx | 6 +++--- src/panel-triggers/components/Problems/Problems.tsx | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/panel-triggers/components/AlertList/AlertCard.tsx b/src/panel-triggers/components/AlertList/AlertCard.tsx index 46d9dd1..b893ac8 100644 --- a/src/panel-triggers/components/AlertList/AlertCard.tsx +++ b/src/panel-triggers/components/AlertList/AlertCard.tsx @@ -13,7 +13,7 @@ import AlertIcon from './AlertIcon'; interface AlertCardProps { problem: ZBXTrigger; panelOptions: ProblemsPanelOptions; - onTagClick?: (tag: ZBXTag, datasource: string) => void; + onTagClick?: (tag: ZBXTag, datasource: string, ctrlKey?: boolean, shiftKey?: boolean) => void; onProblemAck?: (problem: ZBXTrigger, data: AckProblemData) => Promise | any; } @@ -27,9 +27,9 @@ export default class AlertCard extends PureComponent { + handleTagClick = (tag: ZBXTag, ctrlKey?: boolean, shiftKey?: boolean) => { if (this.props.onTagClick) { - this.props.onTagClick(tag, this.props.problem.datasource); + this.props.onTagClick(tag, this.props.problem.datasource, ctrlKey, shiftKey); } } diff --git a/src/panel-triggers/components/AlertList/AlertList.tsx b/src/panel-triggers/components/AlertList/AlertList.tsx index 8d1d08b..a01c155 100644 --- a/src/panel-triggers/components/AlertList/AlertList.tsx +++ b/src/panel-triggers/components/AlertList/AlertList.tsx @@ -12,7 +12,7 @@ export interface AlertListProps { pageSize?: number; fontSize?: number; onProblemAck?: (problem: ZBXTrigger, data: AckProblemData) => void; - onTagClick?: (tag: ZBXTag, datasource: string) => void; + onTagClick?: (tag: ZBXTag, datasource: string, ctrlKey?: boolean, shiftKey?: boolean) => void; } interface AlertListState { @@ -45,9 +45,9 @@ export default class AlertList extends PureComponent { + handleTagClick = (tag: ZBXTag, datasource: string, ctrlKey?: boolean, shiftKey?: boolean) => { if (this.props.onTagClick) { - this.props.onTagClick(tag, datasource); + this.props.onTagClick(tag, datasource, ctrlKey, shiftKey); } } diff --git a/src/panel-triggers/components/Problems/Problems.tsx b/src/panel-triggers/components/Problems/Problems.tsx index c2a1d2d..7301f8d 100644 --- a/src/panel-triggers/components/Problems/Problems.tsx +++ b/src/panel-triggers/components/Problems/Problems.tsx @@ -260,13 +260,13 @@ function LastChangeCell(props: RTCell, customFormat?: string) { } interface TagCellProps extends RTCell { - onTagClick: (tag: ZBXTag, datasource: string) => void; + onTagClick: (tag: ZBXTag, datasource: string, ctrlKey?: boolean, shiftKey?: boolean) => void; } class TagCell extends PureComponent { - handleTagClick = (tag: ZBXTag) => { + handleTagClick = (tag: ZBXTag, ctrlKey?: boolean, shiftKey?: boolean) => { if (this.props.onTagClick) { - this.props.onTagClick(tag, this.props.original.datasource); + this.props.onTagClick(tag, this.props.original.datasource, ctrlKey, shiftKey); } }