Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Infiniflow Ragflow SavingButton Component

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

Overview

Save button components with form validation and knowledge base configuration persistence for both general and parser settings.

Description

This module exports two button components. GeneralSavingButton validates only the name field via form.trigger('name'), then saves a subset of form values (name, description, permission, avatar) along with the existing parser_id from default values. SavingButton validates the entire form, then saves all form values with parser_config transformations: it synchronizes image_context_size and table_context_size from image_table_context_window, and conditionally unsets children_delimiter when enable_children is false. Both use useUpdateKnowledge for the API call and ButtonLoading for loading state.

Usage

Placed at the bottom of the general settings and parser settings sections respectively within the dataset configuration page.

Code Reference

Source Location

Signature

export function GeneralSavingButton(): JSX.Element;
export function SavingButton(): JSX.Element;

Import

import { GeneralSavingButton, SavingButton } from './saving-button';

I/O Contract

Inputs

Name Type Required Description
(FormContext) react-hook-form context Yes Parent form providing all dataset fields
(URL params) string Yes kb_id from route params

Outputs

Name Type Description
JSX.Element React element Save button with loading state

Usage Examples

<FormProvider {...form}>
  <GeneralForm />
  <GeneralSavingButton />
</FormProvider>

Related Pages

Page Connections

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