From 7801b8c42fa9b3829049f250589f22f99aa181d7 Mon Sep 17 00:00:00 2001 From: Mary Hipp Date: Wed, 21 Feb 2024 09:41:50 -0500 Subject: [PATCH] hook up Add Model button --- .../modelManagerV2/subpanels/ModelManager.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManager.tsx b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManager.tsx index 648f98dbb3..900a6a9342 100644 --- a/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManager.tsx +++ b/invokeai/frontend/web/src/features/modelManagerV2/subpanels/ModelManager.tsx @@ -3,8 +3,16 @@ import { SyncModelsIconButton } from 'features/modelManager/components/SyncModel import ModelList from './ModelManagerPanel/ModelList'; import { ModelListNavigation } from './ModelManagerPanel/ModelListNavigation'; +import { useCallback } from 'react'; +import { useAppDispatch } from '../../../app/store/storeHooks'; +import { setSelectedModelKey } from '../store/modelManagerV2Slice'; export const ModelManager = () => { + const dispatch = useAppDispatch(); + const handleClickAddModel = useCallback(() => { + dispatch(setSelectedModelKey(null)); + }, [dispatch]); + return ( @@ -13,7 +21,9 @@ export const ModelManager = () => { - +