Kris20030907 commented on code in PR #7364:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/7364#discussion_r4388111895


##########
web/src/pages/instance/topic.tsx:
##########
@@ -669,26 +670,59 @@ const TopicPageContent = ({
       sendForm.setFieldsValue({ topic: topic.name, tag: '', key: '', body: '', 
properties: [] });
       setSendModalOpen(true);
     } else if (key === 'delete') {
-      modal.confirm({
-        title: '确认删除',
-        content: `确定要删除 Topic「${topic.name}」吗?此操作不可撤销。`,
-        okText: '删除',
-        okType: 'danger',
-        cancelText: '取消',
-        onOk: async () => {
-          try {
-            await deleteTopic(topic.name, selectedInstanceId || undefined);
-            // Drop the deleted row from the selection: a checked row that 
disappears would
-            // otherwise keep the batch delete armed with a name that no 
longer exists, and its
-            // failure path re-seeds that same selection - leaving nothing to 
uncheck.
-            setSelectedRowKeys((previous) => previous.filter((key) => key !== 
topic.name));
-            await reloadTopicPage();
-            message.success(`Topic「${topic.name}」已删除`);
-          } catch {
-            message.error('删除 Topic 失败,请稍后重试');
-          }
-        },
-      });
+      const openDeleteConfirm = (liteSummary: LiteTopicItem | undefined) => {
+        modal.confirm({
+          title: '确认删除',

Review Comment:
   Understood. Thanks for the suggestion; I will make some optimizations.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to