From dae06b90877027d0ebcbba2487f722a088f0ec7a Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 2 Jan 2023 02:03:58 -0800 Subject: [PATCH] Intermediate fix for CheckedState I don't really know how to handle this lol --- components/SearchFilterCheckboxItem/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/SearchFilterCheckboxItem/index.tsx b/components/SearchFilterCheckboxItem/index.tsx index 0c2111fd..073d7b51 100644 --- a/components/SearchFilterCheckboxItem/index.tsx +++ b/components/SearchFilterCheckboxItem/index.tsx @@ -13,8 +13,12 @@ interface Props { } const SearchFilterCheckboxItem = (props: Props) => { - function handleCheckedChange(checked: boolean) { - props.onCheckedChange(checked, props.valueKey) + function handleCheckedChange(checked: string | boolean) { + if (typeof checked === 'boolean') { + props.onCheckedChange(checked, props.valueKey) + } else { + props.onCheckedChange(false, props.valueKey) + } } return (