Performance cleanup; check main box when all children are checked; closes #2379
This commit is contained in:
parent
2182a15494
commit
cbedd4539c
2 changed files with 107 additions and 76 deletions
|
@ -1,7 +1,8 @@
|
|||
import React from 'react';
|
||||
import React, { memo } from 'react';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
||||
import tw from 'twin.macro';
|
||||
import isEqual from 'react-fast-compare';
|
||||
|
||||
interface Props {
|
||||
icon?: IconProp;
|
||||
|
@ -27,4 +28,4 @@ const TitledGreyBox = ({ icon, title, children, className }: Props) => (
|
|||
</div>
|
||||
);
|
||||
|
||||
export default TitledGreyBox;
|
||||
export default memo(TitledGreyBox, isEqual);
|
||||
|
|
Reference in a new issue