From cba0d1f35adfdedae6bbe9984f8b7a89cf935c67 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Sat, 22 Jan 2022 18:13:00 -0500 Subject: [PATCH] fix(design-system): molecules/editor-category: handleRoleListUpdate should not be nested function --- .../design-system/molecules/editor-category/EditorCategory.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/design-system/molecules/editor-category/EditorCategory.tsx b/packages/design-system/molecules/editor-category/EditorCategory.tsx index 0fd1f89..fbf522e 100644 --- a/packages/design-system/molecules/editor-category/EditorCategory.tsx +++ b/packages/design-system/molecules/editor-category/EditorCategory.tsx @@ -21,10 +21,11 @@ export type CategoryProps = { export const EditorCategory = (props: CategoryProps) => { const updateValue = (key: T, value: CategoryT[T]) => { + console.log('update value', { key, value, category: props.category }); props.onChange({ ...props.category, [key]: value }); }; - const handleRoleListUpdate = (roles: RoleT['id'][]) => () => { + const handleRoleListUpdate = (roles: RoleT['id'][]) => { updateValue('roles', roles); };