From 1419430015cb0dc8a0f65cc4228ec5dbb568caec Mon Sep 17 00:00:00 2001 From: AkaraChen Date: Tue, 7 Jan 2025 11:25:06 +0800 Subject: [PATCH] chore: upd --- .../workflow/nodes/_base/components/install-plugin-button.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/_base/components/install-plugin-button.tsx b/web/app/components/workflow/nodes/_base/components/install-plugin-button.tsx index f6a3334378..bdbcdfde5a 100644 --- a/web/app/components/workflow/nodes/_base/components/install-plugin-button.tsx +++ b/web/app/components/workflow/nodes/_base/components/install-plugin-button.tsx @@ -7,10 +7,11 @@ import { useCheckInstalled, useInstallPackageFromMarketPlace } from '@/service/u type InstallPluginButtonProps = Omit, 'children' | 'loading'> & { uniqueIdentifier: string + onSuccess?: () => void } export const InstallPluginButton = (props: InstallPluginButtonProps) => { - const { className, uniqueIdentifier, ...rest } = props + const { className, uniqueIdentifier, onSuccess, ...rest } = props const { t } = useTranslation() const manifest = useCheckInstalled({ pluginIds: [uniqueIdentifier], @@ -19,6 +20,7 @@ export const InstallPluginButton = (props: InstallPluginButtonProps) => { const install = useInstallPackageFromMarketPlace({ onSuccess() { manifest.refetch() + onSuccess?.() }, }) const handleInstall: MouseEventHandler = (e) => {