fix: pass language to calcSelectionInfo

This commit is contained in:
Sanchit Agarwal 2023-06-13 20:42:54 +05:30 committed by tato
parent 2d3263cdf3
commit 5f570a85d3

View File

@ -100,8 +100,9 @@ const Workbook = React.forwardRef<WorkbookInstance, Settings & AdditionalProps>(
// 计算选区的信息 // 计算选区的信息
useEffect(() => { useEffect(() => {
const selection = context.luckysheet_select_save; const selection = context.luckysheet_select_save;
const { lang } = props;
if (selection) { if (selection) {
const re = calcSelectionInfo(context); const re = calcSelectionInfo(context, lang);
setCalInfo(re); setCalInfo(re);
} }
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps