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 RenameForm Component

From Leeroopedia
Revision as of 11:22, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Infiniflow_Ragflow_RenameForm_Component.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Frontend, Knowledge_Base
Last Updated 2026-02-12 06:00 GMT

Overview

Zod-validated form for renaming knowledge base tags with API integration.

Description

RenameForm renders a single-field form for tag renaming. It uses react-hook-form with zodResolver and a Zod schema requiring a non-empty trimmed string. The form's id is set to TagRenameId for external submit button binding. On submit, it calls useRenameTag().renameTag with fromTag (the initial name) and toTag (the new name). A useEffect syncs the initialName prop to the form value when it changes. The modal is dismissed on successful rename.

Usage

Rendered inside a rename dialog modal within the tag table section of dataset settings.

Code Reference

Source Location

Signature

export function RenameForm({
  initialName, hideModal,
}: IModalProps<any> & { initialName: string }): JSX.Element;

Import

import { RenameForm } from './rename-form';

I/O Contract

Inputs

Name Type Required Description
initialName string Yes Current tag name to rename from
hideModal function No Callback to close the dialog on success

Outputs

Name Type Description
JSX.Element React element Form with name input, validation, and submit binding

Usage Examples

<RenameForm initialName="old-tag" hideModal={() => setVisible(false)} />

Related Pages

Page Connections

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