Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

fix(frontend): fix exhaustive-deps errors blocking the eslint ratchet

dextmorgnfa8c5078a7f8
diff --git a/flowsint-app/src/components/table/data-table.tsx b/flowsint-app/src/components/table/data-table.tsx
index d9a341e7..3f52af89 100644
--- a/flowsint-app/src/components/table/data-table.tsx
+++ b/flowsint-app/src/components/table/data-table.tsx
@@ -90,6 +90,7 @@ const VirtualCell = React.memo<{
columnSizeVars: Record<string, number>
noStickyCol?: boolean
}>(({ cell, index, isFirst, isLast, isBeforeLast, columnSizeVars, noStickyCol }) => {
+ const colSizeVar = columnSizeVars[`--col-${cell.column.id}-size`]
const cellStyle = React.useMemo(
() => ({
width: `calc(var(--col-${cell.column.id}-size) * 1px)`,
@@ -99,7 +100,7 @@ const VirtualCell = React.memo<{
verticalAlign: 'middle',
textAlign: 'center'
}),
- [cell.column.id, columnSizeVars[`--col-${cell.column.id}-size`]]
+ [cell.column.id, colSizeVar]
)
const cellClassName = React.useMemo(
@@ -234,13 +235,14 @@ const HeaderCell = React.memo<{
columnSizeVars: Record<string, number>
noStickyCol?: boolean
}>(({ header, index, isFirst, isLast, isBeforeLast, columnSizeVars, noStickyCol }) => {
+ const headerSizeVar = columnSizeVars[`--header-${header.id}-size`]
const headerStyle = React.useMemo(
() => ({
width: `calc(var(--header-${header.id}-size) * 1px)`,
minWidth: `calc(var(--header-${header.id}-size) * 1px)`,
maxWidth: `calc(var(--header-${header.id}-size) * 1px)`
}),
- [header.id, columnSizeVars[`--header-${header.id}-size`]]
+ [header.id, headerSizeVar]
)
const headerClassName = React.useMemo(