tag-feature-item.tsx


Overview

tag-feature-item.tsx is a React functional component designed for managing and rendering a dynamic list of tag-feature configurations within a form. It provides an interface to add, select, and configure multiple tags along with their associated frequency values. This component integrates with a knowledge base system by fetching configuration and tag data using custom hooks and ensures the user selects unique tags across the list.

The component leverages Ant Design's form-related components (Form, Select, InputNumber, Button) and icons for UI consistency and usability. It also supports internationalization via the react-i18next library.


Detailed Component Explanation

TagFeatureItem

Description

Renders a form item that allows users to manage a list of tags, each with a frequency value. Users can dynamically add or remove tags. The tag options are fetched based on configured knowledge base IDs and filtered to avoid duplicate selections in the list.

Usage

Used within a form context (wrapped inside an Ant Design Form) when tag-feature configuration is required from the user, particularly for knowledge base or tagging systems.


Internal Mechanics and Hooks Used


Props

This component does not receive any props directly; it relies on the form context provided by Ant Design's Form component.


Internal Constants and Variables