Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: variable tree remove button event handling #134

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/playground/src/layouts/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import React, { StrictMode } from 'react';
import { Outlet } from 'umi';
import './index.less';

export default function Layout() {
return (
<div>
<StrictMode>
<Outlet />
</div>
</StrictMode>
);
}
3 changes: 2 additions & 1 deletion packages/designer/src/components/variable-tree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ export function VariableTree(props: VariableTreeProps) {
{node.showRemoveButton && (
<Popconfirm
title={`确认删除吗 ${node.title}?该操作会导致引用此模型的代码报错,请谨慎操作!`}
onConfirm={() => {
onConfirm={(e) => {
e.stopPropagation();
if (isStoreVariablePath(node.key)) {
onRemoveStoreVariable(node.key);
} else {
Expand Down
Loading