From feac6e8bd9a362e1d987d10fed04cc4a88163271 Mon Sep 17 00:00:00 2001 From: Fumiya Kubota Date: Fri, 18 Feb 2022 18:23:44 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A8=E3=83=B3=E3=83=86=E3=82=A3=E3=83=86?= =?UTF-8?q?=E3=82=A3=E6=95=B0=E3=81=A7=E8=A1=A8=E7=A4=BA=E3=82=92=E5=88=B6?= =?UTF-8?q?=E9=99=90=E3=81=99=E3=82=8B=E6=95=B0=E5=80=A4=E3=81=AE=E3=83=87?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88=E3=82=921=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node/src/ts/visualizer/components/Filter.tsx | 4 ++-- node/src/ts/visualizer/index.tsx | 2 +- node/src/ts/visualizer/reducers/filter.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/node/src/ts/visualizer/components/Filter.tsx b/node/src/ts/visualizer/components/Filter.tsx index 4e916b8a..0c17da6f 100644 --- a/node/src/ts/visualizer/components/Filter.tsx +++ b/node/src/ts/visualizer/components/Filter.tsx @@ -16,11 +16,11 @@ const Filter: React.FC = () => { const query = useQuery() const defaultEntitiesLimit = useMemo(() => { - const limit = Number(query.get('lower_limit')) + const limit = Number(query.get('lower_limit')) || 1 if (Number.isInteger(limit)) { return limit } - return 0 + return 1 }, []) const handleClick = useCallback(() => { diff --git a/node/src/ts/visualizer/index.tsx b/node/src/ts/visualizer/index.tsx index 9767a210..872dbcff 100644 --- a/node/src/ts/visualizer/index.tsx +++ b/node/src/ts/visualizer/index.tsx @@ -171,7 +171,7 @@ const App: React.FC = (props) => { return } - if (lowerLimitOfClassEntities === 0) { + if (lowerLimitOfClassEntities <= 1) { history.push({ pathname: history.location.pathname, }) diff --git a/node/src/ts/visualizer/reducers/filter.ts b/node/src/ts/visualizer/reducers/filter.ts index 36449aa9..76f00228 100644 --- a/node/src/ts/visualizer/reducers/filter.ts +++ b/node/src/ts/visualizer/reducers/filter.ts @@ -7,7 +7,7 @@ export interface FilterState { } const initialState: FilterState = { - lowerLimitOfClassEntities: 0, + lowerLimitOfClassEntities: 1, showingConditions: false, }