Skip to content

Commit

Permalink
sam
Browse files Browse the repository at this point in the history
  • Loading branch information
SamDudley committed Feb 7, 2025
1 parent 114e616 commit f2509af
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions front_end/src/Components/TableCell/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@ const TableCell = ({
let editing = false;
const isPayrollEnabled = JSON.parse(localStorage.getItem("isPayrollEnabled"));

const checkValue = (val) => {
if (cellId === val) {
const checkValue = (oldValue, newValue) => {
if (cellId === newValue) {
editing = true;
return false;
} else if (editing) {
// Turn off editing
editing = false;
return false;
}

return true;
return oldValue === newValue;
};

let selectChanged = false;
Expand Down Expand Up @@ -264,11 +262,7 @@ const TableCell = ({
id={getId()}
onDoubleClick={() => {
if (isEditable && !isOverride()) {
dispatch(
SET_EDITING_CELL({
cellId: cellId,
}),
);
dispatch(SET_EDITING_CELL({ cellId: cellId }));
}
}}
>
Expand Down

0 comments on commit f2509af

Please sign in to comment.