fix: isAllowEdit deps

This commit is contained in:
fogmoon 2023-07-18 10:14:55 +08:00 committed by tato
parent 77dbf079fc
commit e7d261e6fe

View File

@ -105,7 +105,15 @@ const FxEditor: React.FC = () => {
// formula.rangeResizeTo = $("#luckysheet-functionbox-cell");
});
}
}, [context, refs.globalCache, setContext]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
context.config,
context.luckysheet_select_save,
context.luckysheetfile,
context.currentSheetId,
refs.globalCache,
setContext,
]);
const onKeyDown = useCallback(
(e: React.KeyboardEvent<HTMLDivElement>) => {
@ -276,7 +284,14 @@ const FxEditor: React.FC = () => {
return false;
}
return true;
}, [context, isHidenRC]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
context.config,
context.luckysheet_select_save,
context.luckysheetfile,
context.currentSheetId,
isHidenRC,
]);
return (
<div className="fortune-fx-editor">