@@ -71,37 +71,41 @@ function OurlogsSectionContent({
71
71
const sharedHoverTimeoutRef = useRef < NodeJS . Timeout | null > ( null ) ;
72
72
73
73
const limitToTraceId = event . contexts ?. trace ?. trace_id ;
74
- const onOpenLogsDrawer = useCallback ( ( ) => {
75
- trackAnalytics ( 'logs.issue_details.drawer_opened' , {
76
- organization,
77
- } ) ;
78
- openDrawer (
79
- ( ) => (
80
- < LogsQueryParamsProvider source = "state" >
81
- < LogsPageParamsProvider
82
- analyticsPageSource = { LogsAnalyticsPageSource . ISSUE_DETAILS }
83
- isTableFrozen
84
- limitToTraceId = { limitToTraceId }
85
- >
86
- < LogsPageDataProvider >
87
- < TraceItemAttributeProvider traceItemType = { TraceItemDataset . LOGS } enabled >
88
- < OurlogsDrawer group = { group } event = { event } project = { project } />
89
- </ TraceItemAttributeProvider >
90
- </ LogsPageDataProvider >
91
- </ LogsPageParamsProvider >
92
- </ LogsQueryParamsProvider >
93
- ) ,
94
- {
95
- ariaLabel : 'logs drawer' ,
96
- drawerKey : 'logs-issue-drawer' ,
74
+ const onOpenLogsDrawer = useCallback (
75
+ ( e : React . MouseEvent < HTMLDivElement | HTMLButtonElement > ) => {
76
+ e . stopPropagation ( ) ;
77
+ trackAnalytics ( 'logs.issue_details.drawer_opened' , {
78
+ organization,
79
+ } ) ;
80
+ openDrawer (
81
+ ( ) => (
82
+ < LogsQueryParamsProvider source = "state" >
83
+ < LogsPageParamsProvider
84
+ analyticsPageSource = { LogsAnalyticsPageSource . ISSUE_DETAILS }
85
+ isTableFrozen
86
+ limitToTraceId = { limitToTraceId }
87
+ >
88
+ < LogsPageDataProvider >
89
+ < TraceItemAttributeProvider traceItemType = { TraceItemDataset . LOGS } enabled >
90
+ < OurlogsDrawer group = { group } event = { event } project = { project } />
91
+ </ TraceItemAttributeProvider >
92
+ </ LogsPageDataProvider >
93
+ </ LogsPageParamsProvider >
94
+ </ LogsQueryParamsProvider >
95
+ ) ,
96
+ {
97
+ ariaLabel : 'logs drawer' ,
98
+ drawerKey : 'logs-issue-drawer' ,
97
99
98
- shouldCloseOnInteractOutside : element => {
99
- const viewAllButton = viewAllButtonRef . current ;
100
- return ! viewAllButton ?. contains ( element ) ;
101
- } ,
102
- }
103
- ) ;
104
- } , [ group , event , project , openDrawer , organization , limitToTraceId ] ) ;
100
+ shouldCloseOnInteractOutside : element => {
101
+ const viewAllButton = viewAllButtonRef . current ;
102
+ return ! viewAllButton ?. contains ( element ) ;
103
+ } ,
104
+ }
105
+ ) ;
106
+ } ,
107
+ [ group , event , project , openDrawer , organization , limitToTraceId ]
108
+ ) ;
105
109
if ( ! feature ) {
106
110
return null ;
107
111
}
@@ -121,7 +125,7 @@ function OurlogsSectionContent({
121
125
title = { t ( 'Logs' ) }
122
126
data-test-id = "logs-data-section"
123
127
>
124
- < SmallTableContentWrapper onClick = { ( ) => onOpenLogsDrawer ( ) } >
128
+ < SmallTableContentWrapper onClick = { onOpenLogsDrawer } >
125
129
< SmallTable >
126
130
< TableBody >
127
131
{ abbreviatedTableData ?. map ( ( row , index ) => (
@@ -143,7 +147,7 @@ function OurlogsSectionContent({
143
147
icon = { < IconChevron direction = "right" /> }
144
148
aria-label = { t ( 'View more' ) }
145
149
size = "sm"
146
- onClick = { ( ) => onOpenLogsDrawer ( ) }
150
+ onClick = { onOpenLogsDrawer }
147
151
ref = { viewAllButtonRef }
148
152
>
149
153
{ t ( 'View more' ) }
0 commit comments