From fe0d9de28c7ef3a432696b256c206cad1c9983c2 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Thu, 21 Sep 2023 03:39:44 -0400 Subject: [PATCH] fix(striker-ui): correct types in file input group --- striker-ui/components/Files/FileInputGroup.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/striker-ui/components/Files/FileInputGroup.tsx b/striker-ui/components/Files/FileInputGroup.tsx index a50a598c..3d7ed827 100644 --- a/striker-ui/components/Files/FileInputGroup.tsx +++ b/striker-ui/components/Files/FileInputGroup.tsx @@ -40,7 +40,7 @@ const FileInputGroup: FC = (props) => { const handleCheckAllLocations = useCallback( (type: keyof FileFormikLocations, checked: boolean) => { - formik.setValues((previous) => { + formik.setValues((previous: FileFormikValues) => { const current = cloneDeep(previous); const locations = current[fuuid].locations?.[type]; @@ -58,7 +58,9 @@ const FileInputGroup: FC = (props) => { const getAllLocationsCheckboxProps = useCallback( (type: keyof FileFormikLocations): CheckboxProps => { - const locations = formik.values[fuuid].locations?.[type]; + const locations = formik.values[fuuid].locations?.[type] as { + [uuid: string]: { active: boolean }; + }; if (!locations) return {};