Skip to content

Commit

Permalink
FIX-2055 review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasbruvik committed Oct 6, 2023
1 parent 425ba54 commit 71589ea
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const CurveValuesView = (): React.ReactElement => {
}, [autoRefresh]);

const getDeleteLogCurveValuesJob = useCallback(
(currentSelected: LogCurveInfoRow[], checkedContentItems: CurveValueRow[], selectedLog: LogObject) => {
(currentSelected: LogCurveInfoRow[], checkedContentItems: CurveValueRow[], selectedLog: LogObject, tableData: CurveValueRow[]) => {
const indexRanges = getIndexRanges(checkedContentItems, tableData, selectedLog);
const mnemonics = currentSelected.map((logCurveInfoRow) => logCurveInfoRow.mnemonic);

Expand Down Expand Up @@ -107,12 +107,12 @@ export const CurveValuesView = (): React.ReactElement => {

const onContextMenu = useCallback(
(event: React.MouseEvent<HTMLDivElement>, _: CurveValueRow, checkedContentItems: CurveValueRow[]) => {
const deleteLogCurveValuesJob = getDeleteLogCurveValuesJob(selectedLogCurveInfo, checkedContentItems, selectedLog);
const deleteLogCurveValuesJob = getDeleteLogCurveValuesJob(selectedLogCurveInfo, checkedContentItems, selectedLog, tableData);
const contextMenuProps = { deleteLogCurveValuesJob, dispatchOperation };
const position = getContextMenuPosition(event);
dispatchOperation({ type: OperationType.DisplayContextMenu, payload: { component: <MnemonicsContextMenu {...contextMenuProps} />, position } });
},
[selectedLogCurveInfo, selectedLog, getDeleteLogCurveValuesJob, dispatchOperation, getContextMenuPosition]
[selectedLogCurveInfo, selectedLog, getDeleteLogCurveValuesJob, dispatchOperation, getContextMenuPosition, tableData]
);

const updateColumns = (curveSpecifications: CurveSpecification[]) => {
Expand Down

0 comments on commit 71589ea

Please sign in to comment.