Log Context: Unify pinnedLogs and pinnedRowId props (#101067)

This commit is contained in:
Matias Chomicki
2025-02-26 17:08:20 +01:00
committed by GitHub
parent 8c935c8f4a
commit 6614f5c3b2
2 changed files with 2 additions and 3 deletions
@@ -61,7 +61,6 @@ export interface Props {
permalinkedRowId?: string;
scrollIntoView?: (element: HTMLElement) => void;
isFilterLabelActive?: (key: string, value: string, refId?: string) => Promise<boolean>;
pinnedRowId?: string;
pinnedLogs?: string[];
/**
* If false or undefined, the `contain:strict` css property will be added to the wrapping `<table>` for performance reasons.
@@ -305,7 +304,7 @@ export const LogRows = memo(
onPinLine={props.onPinLine}
onUnpinLine={props.onUnpinLine}
pinLineButtonTooltipTitle={props.pinLineButtonTooltipTitle}
pinned={props.pinnedRowId === row.uid || pinnedLogs?.some((logId) => logId === row.rowId)}
pinned={pinnedLogs?.some((logId) => logId === row.rowId || logId === row.uid)}
isFilterLabelActive={props.isFilterLabelActive}
handleTextSelection={handleSelection}
enableLogDetails={enableLogDetails}
@@ -561,7 +561,7 @@ export const LogRowContextModal: React.FunctionComponent<LogRowContextModalProps
onClickHideField={hideField}
onUnpinLine={() => setSticky(false)}
onPinLine={() => setSticky(true)}
pinnedRowId={sticky ? row.uid : undefined}
pinnedLogs={sticky ? [row.uid] : undefined}
overflowingContent={true}
scrollElement={null}
/>