@@ -121,7 +121,7 @@ const makeHeaderOpts = (
121121 style = { {
122122 display : isFirstSelectedRow && isFirstColumn ? 'flex' : '' ,
123123 } } >
124- { isSecureHTTPContext ? < IconDotsVertical stroke = { 1.2 } size = { '0.8rem' } color = "#545beb" /> : null }
124+ < IconDotsVertical stroke = { 1.2 } size = { '0.8rem' } color = "#545beb" />
125125 </ div >
126126 { sanitizedValue }
127127 < div className = { tableStyles . copyIconContainer } >
@@ -149,9 +149,8 @@ const Table = (props: { primaryHeaderHeight: number }) => {
149149 } ) ;
150150
151151 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 ) ;
155154 const [ isSecureHTTPContext ] = useAppStore ( ( store ) => store . isSecureHTTPContext ) ;
156155 const [ fieldTypeMap ] = useStreamStore ( ( store ) => store . fieldTypeMap ) ;
157156 const columns = useMemo (
@@ -291,15 +290,15 @@ const Table = (props: { primaryHeaderHeight: number }) => {
291290 enableColumnPinning
292291 initialState = { {
293292 columnPinning : {
294- left : [ 'rowNumber' ] ,
293+ left : pinnedColumns ,
295294 } ,
296295 } }
297296 enableStickyHeader
298297 defaultColumn = { { minSize : 100 } }
299298 layoutMode = "grid"
300299 state = { {
301300 columnPinning : {
302- left : [ 'rowNumber' ] ,
301+ left : pinnedColumns ,
303302 } ,
304303 columnVisibility,
305304 columnOrder : orderedHeaders ,
@@ -341,20 +340,24 @@ const Table = (props: { primaryHeaderHeight: number }) => {
341340
342341 return null ;
343342 } ) ( ) }
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+ ) }
358361 </ Menu >
359362 </ div >
360363 ) }
0 commit comments