@@ -121,7 +121,7 @@ const makeHeaderOpts = (
121
121
style = { {
122
122
display : isFirstSelectedRow && isFirstColumn ? 'flex' : '' ,
123
123
} } >
124
- { isSecureHTTPContext ? < IconDotsVertical stroke = { 1.2 } size = { '0.8rem' } color = "#545beb" /> : null }
124
+ < IconDotsVertical stroke = { 1.2 } size = { '0.8rem' } color = "#545beb" />
125
125
</ div >
126
126
{ sanitizedValue }
127
127
< div className = { tableStyles . copyIconContainer } >
@@ -149,9 +149,8 @@ const Table = (props: { primaryHeaderHeight: number }) => {
149
149
} ) ;
150
150
151
151
const contextMenuRef = useRef < HTMLDivElement > ( null ) ;
152
- const [ { orderedHeaders, disabledColumns, pageData, wrapDisabledColumns, rowNumber } , setLogsStore ] = useLogsStore (
153
- ( store ) => store . tableOpts ,
154
- ) ;
152
+ const [ { orderedHeaders, disabledColumns, pageData, wrapDisabledColumns, rowNumber, pinnedColumns } , setLogsStore ] =
153
+ useLogsStore ( ( store ) => store . tableOpts ) ;
155
154
const [ isSecureHTTPContext ] = useAppStore ( ( store ) => store . isSecureHTTPContext ) ;
156
155
const [ fieldTypeMap ] = useStreamStore ( ( store ) => store . fieldTypeMap ) ;
157
156
const columns = useMemo (
@@ -291,15 +290,15 @@ const Table = (props: { primaryHeaderHeight: number }) => {
291
290
enableColumnPinning
292
291
initialState = { {
293
292
columnPinning : {
294
- left : [ 'rowNumber' ] ,
293
+ left : pinnedColumns ,
295
294
} ,
296
295
} }
297
296
enableStickyHeader
298
297
defaultColumn = { { minSize : 100 } }
299
298
layoutMode = "grid"
300
299
state = { {
301
300
columnPinning : {
302
- left : [ 'rowNumber' ] ,
301
+ left : pinnedColumns ,
303
302
} ,
304
303
columnVisibility,
305
304
columnOrder : orderedHeaders ,
@@ -341,20 +340,24 @@ const Table = (props: { primaryHeaderHeight: number }) => {
341
340
342
341
return null ;
343
342
} ) ( ) }
344
- < Menu . Item
345
- onClick = { ( ) => {
346
- copyJSON ( ) ;
347
- closeContextMenu ( ) ;
348
- } } >
349
- Copy JSON
350
- </ Menu . Item >
351
- < Menu . Item
352
- onClick = { ( ) => {
353
- copyUrl ( ) ;
354
- closeContextMenu ( ) ;
355
- } } >
356
- Copy permalink
357
- </ Menu . Item >
343
+ { isSecureHTTPContext && (
344
+ < >
345
+ < Menu . Item
346
+ onClick = { ( ) => {
347
+ copyJSON ( ) ;
348
+ closeContextMenu ( ) ;
349
+ } } >
350
+ Copy JSON
351
+ </ Menu . Item >
352
+ < Menu . Item
353
+ onClick = { ( ) => {
354
+ copyUrl ( ) ;
355
+ closeContextMenu ( ) ;
356
+ } } >
357
+ Copy permalink
358
+ </ Menu . Item >
359
+ </ >
360
+ ) }
358
361
</ Menu >
359
362
</ div >
360
363
) }
0 commit comments