web: Components: Added shouldComponentUpdate

This commit is contained in:
Alexey Safronov 2019-10-31 17:34:48 +03:00
parent 5b9d02bcc3
commit eae2a45b71

View File

@ -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;