Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow ConfirmDeleteDialog Component

From Leeroopedia
Knowledge Sources
Domains Frontend, UI_Components
Last Updated 2026-02-12 06:00 GMT

Overview

Concrete confirmation dialog for destructive delete operations with custom content and avatar support provided by the RAGFlow frontend.

Description

Exports ConfirmDeleteDialog (overlay modal with title, description, and confirm/cancel buttons) and ConfirmDeleteDialogNode (inline variant). Both support avatar display, custom confirmation text, and loading state on the confirm button.

Usage

Import this component wherever destructive delete operations need user confirmation, such as deleting knowledge bases, documents, agents, or files.

Code Reference

Source Location

Signature

export function ConfirmDeleteDialog(props: {
  title?: string;
  description?: string;
  onConfirm?: () => void;
  onCancel?: () => void;
  loading?: boolean;
  children?: ReactNode;
} & DialogProps): JSX.Element;

export const ConfirmDeleteDialogNode: (props: {
  name: string;
  avatar?: string;
  onConfirm: () => void;
}) => JSX.Element;

Import

import { ConfirmDeleteDialog } from '@/components/confirm-delete-dialog';

I/O Contract

Inputs

Name Type Required Description
title string No Dialog title
onConfirm function Yes Callback when delete confirmed
loading boolean No Show loading spinner on confirm button

Outputs

Name Type Description
onConfirm callback void Deletion confirmed by user

Usage Examples

import { ConfirmDeleteDialog } from '@/components/confirm-delete-dialog';

<ConfirmDeleteDialog
  title="Delete Knowledge Base"
  description="This action cannot be undone."
  onConfirm={handleDelete}
  loading={isDeleting}
/>

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment