From eae2a45b717afc0ce89f6bc2bc4678ad3aa6071d Mon Sep 17 00:00:00 2001 From: Alexey Safronov Date: Thu, 31 Oct 2019 17:34:48 +0300 Subject: [PATCH] web: Components: Added shouldComponentUpdate --- .../advanced-selector/sub-components/groups/body.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/ASC.Web.Components/src/components/advanced-selector/sub-components/groups/body.js b/web/ASC.Web.Components/src/components/advanced-selector/sub-components/groups/body.js index b7bc165afc..1cf74be0a3 100644 --- a/web/ASC.Web.Components/src/components/advanced-selector/sub-components/groups/body.js +++ b/web/ASC.Web.Components/src/components/advanced-selector/sub-components/groups/body.js @@ -4,8 +4,15 @@ import CustomScrollbarsVirtualList from "../../../scrollbar/custom-scrollbars-vi import { FixedSizeList } from "react-window"; import ADSelectorRow from "../row"; import findIndex from "lodash/findIndex"; +import isEqual from "lodash/isEqual"; class ADSelectorGroupsBody extends React.Component { + + shouldComponentUpdate(nextProps) { + const needUpdate = !isEqual(this.props, nextProps); + return needUpdate; + } + renderRow = ({ data, index, style }) => { const {isMultiSelect, selectedAll, selectedOptions, currentGroup} = this.props;