From d1d20e9cb5bc8235a65c97d3ef573ac67e1fd831 Mon Sep 17 00:00:00 2001 From: "a.bouhuolia" Date: Tue, 3 Aug 2021 08:52:38 +0200 Subject: [PATCH] fix: FastField re-rendering conditions. --- client/src/components/DataTable.js | 1 - client/src/components/Datatable/TableFastCell.js | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/DataTable.js b/client/src/components/DataTable.js index ec0c5bab3..af3486122 100644 --- a/client/src/components/DataTable.js +++ b/client/src/components/DataTable.js @@ -10,7 +10,6 @@ import { useAsyncDebounce, } from 'react-table'; import { useSticky } from 'react-table-sticky'; -import intl from 'react-intl-universal'; import { useUpdateEffect } from 'hooks'; import { saveInvoke } from 'utils'; diff --git a/client/src/components/Datatable/TableFastCell.js b/client/src/components/Datatable/TableFastCell.js index b086e9b9d..b4c990d39 100644 --- a/client/src/components/Datatable/TableFastCell.js +++ b/client/src/components/Datatable/TableFastCell.js @@ -7,6 +7,8 @@ function TableFastCell({ cell, row, index }) { export default memo(TableFastCell, (prevProps, nextProps) => { if ( + prevProps.row.canExpand === nextProps.row.canExpand && + prevProps.row.isExpanded === nextProps.row.isExpanded && prevProps.cell.value === nextProps.cell.value && prevProps.cell.maxWidth === nextProps.cell.maxWidth && prevProps.cell.width === nextProps.cell.width