You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2024/08/14 15:36:34 UTC
(camel-karavan) branch main updated: Clean file list on exit from project panel
This is an automated email from the ASF dual-hosted git repository.
marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
The following commit(s) were added to refs/heads/main by this push:
new 14192b03 Clean file list on exit from project panel
14192b03 is described below
commit 14192b0311ef8e5a2b52ec6e6cc1333d5cedee90
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Wed Aug 14 11:36:27 2024 -0400
Clean file list on exit from project panel
---
karavan-app/src/main/webui/src/project/ProjectPanel.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/karavan-app/src/main/webui/src/project/ProjectPanel.tsx b/karavan-app/src/main/webui/src/project/ProjectPanel.tsx
index 5f9d1d73..f41d5710 100644
--- a/karavan-app/src/main/webui/src/project/ProjectPanel.tsx
+++ b/karavan-app/src/main/webui/src/project/ProjectPanel.tsx
@@ -43,11 +43,12 @@ export function ProjectPanel() {
const [config] = useAppConfigStore((state) => [state.config], shallow)
const [project, tab, setTab] = useProjectStore((s) => [s.project, s.tabIndex, s.setTabIndex], shallow);
const [setFile] = useFileStore((s) => [s.setFile], shallow);
- const [files] = useFilesStore((s) => [s.files], shallow);
+ const [files, setFiles] = useFilesStore((s) => [s.files, s.setFiles], shallow);
const [setShowWizard] = useWizardStore((s) => [s.setShowWizard], shallow)
useEffect(() => {
onRefresh();
+ return () => setFiles([]);
}, [project.projectId]);
function onRefresh() {