From bcf4a5ae60315e0486499370d29188ba332c331b Mon Sep 17 00:00:00 2001 From: Sethanant Pipatpakorn Date: Wed, 6 Oct 2021 22:31:30 +0700 Subject: [PATCH 1/2] add reset button :sparkles: --- src/components/Table/index.js | 16 +++++++++++++++- src/components/Table/styles.scss | 7 ++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/components/Table/index.js b/src/components/Table/index.js index b79cf123..d2b537ff 100644 --- a/src/components/Table/index.js +++ b/src/components/Table/index.js @@ -6,6 +6,7 @@ import { Row, Badge, NavLink, + Button, } from 'reactstrap'; import Toggle from 'react-toggle'; import ReactTooltip from 'react-tooltip'; @@ -132,6 +133,19 @@ const Table = () => { Hard: {difficultyCount.Hard}/{totalDifficultyCount.Hard} +
+ ); }, @@ -322,7 +336,7 @@ const Table = () => { }, ], // eslint-disable-next-line - [], + [checked, difficultyCount], ); const { diff --git a/src/components/Table/styles.scss b/src/components/Table/styles.scss index 8004072c..a7e65541 100644 --- a/src/components/Table/styles.scss +++ b/src/components/Table/styles.scss @@ -40,8 +40,13 @@ .companies img { padding: 5px; } - + .react-toggle { top: 7px; } + + .reset-button { + margin-top: 10px; + font-size: 0.7rem; + } } From 5f56676177ef75b40382fec39e1f3385cdb1d30e Mon Sep 17 00:00:00 2001 From: Sethanant Pipatpakorn Date: Wed, 20 Oct 2021 11:05:37 +0700 Subject: [PATCH 2/2] remove checked, difficultyCount from React.useMemo --- src/components/Table/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Table/index.js b/src/components/Table/index.js index d2b537ff..7d6fa76f 100644 --- a/src/components/Table/index.js +++ b/src/components/Table/index.js @@ -336,7 +336,7 @@ const Table = () => { }, ], // eslint-disable-next-line - [checked, difficultyCount], + [], ); const {