Implementation:Infiniflow Ragflow DatasetActionCell Component
| Knowledge Sources | |
|---|---|
| Domains | Frontend, Knowledge_Base |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
Table action cell component providing rename, preview, download, and delete operations with running-state guards.
Description
DatasetActionCell renders a row of action buttons that appear on hover (via group-hover:opacity-100). All action buttons are disabled when the document parser is running (checked via isParserRunning). The rename button calls showRenameModal. The eye button opens a HoverCard displaying document metadata fields (name, size, type, create_time, update_time) with appropriate formatters (formatFileSize, formatDate). The download button triggers downloadDocument. The delete button uses ConfirmDeleteDialog wrapping useRemoveDocument. Virtual documents hide the download button.
Usage
Rendered in the actions column of the dataset document table to provide per-row document operations.
Code Reference
Source Location
- Repository: Infiniflow_Ragflow
- File: web/src/pages/dataset/dataset/dataset-action-cell.tsx
- Lines: 1-118
Signature
export function DatasetActionCell({
record, showRenameModal,
}: { record: IDocumentInfo } & UseRenameDocumentShowType): JSX.Element;
Import
import { DatasetActionCell } from './dataset-action-cell';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| record | IDocumentInfo | Yes | Document data for the table row |
| showRenameModal | function | Yes | Callback to open rename dialog |
Outputs
| Name | Type | Description |
|---|---|---|
| JSX.Element | React element | Row of action buttons (rename, preview, download, delete) |
Usage Examples
<DatasetActionCell record={row.original} showRenameModal={showRenameModal} />