Skip to content

Commit

Permalink
Fix end of new input
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaetanbrl committed Oct 12, 2022
1 parent af1e168 commit 49244fa
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ export default function Tabou2LogsTable({

// hooks to manage feature logs if refreshed
useEffect(() => {
if (!isEqual(logs, allLogs)) {
setAllLogs(logs);
if (!isEqual(logs, allLogs) && isEmpty(logInChange)) {
setAllLogs([...logs, ...allLogs.filter(x => editionActivate.current && x.new)]);
}
}, [logs]);
useEffect(() => {
setAllLogs(logs);
if (!isEqual(logs, allLogs) && isEmpty(logInChange)) {
setAllLogs([...logs, ...allLogs.filter(x => editionActivate.current && x.new)]);
}
}, [props.eventsId]);

const cancel = () => {
Expand All @@ -75,16 +77,16 @@ export default function Tabou2LogsTable({
};

const saveEvent = () => {
cancelChange(logInChange);
setLogInChange(null);
cancelChange(logInChange);
props.saveEvent(logInChange);
};

// manage sort style
const getStyle = (name) => {
return find(sortField, [0, name]) ? {color: "darkcyan"} : {color: "rgb(51, 51, 51)"};
};
console.log(isEmpty(logInChange));

return (
<Grid fluid style={{overflow: "auto", height: "100%"}}>
<Row>
Expand Down

0 comments on commit 49244fa

Please sign in to comment.