Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: Modify the text color of the TreeSelect component. (#19507)

balibabu1406980e8676
diff --git a/web/src/components/originui/select-with-search.tsx b/web/src/components/originui/select-with-search.tsx
index f968fb7b07..ad4f45790c 100644
--- a/web/src/components/originui/select-with-search.tsx
+++ b/web/src/components/originui/select-with-search.tsx
@@ -256,7 +256,7 @@ export const SelectWithSearch = forwardRef<
)}
>
{selectLabel || value ? (
- <span className="flex min-w-0 options-center gap-2 truncate">
+ <span className="flex min-w-0 options-center gap-2 truncate text-text-primary">
{selectLabel || value}
</span>
) : (
@@ -295,7 +295,7 @@ export const SelectWithSearch = forwardRef<
? t('common.searchOrEnterToAdd') + '...'
: t('common.search') + '...'
}
- className=" placeholder:text-text-disabled"
+ className="placeholder:text-text-disabled"
value={searchValue}
onValueChange={setSearchValue}
onKeyDown={handleInputKeyDown}
diff --git a/web/src/components/tree-select.tsx b/web/src/components/tree-select.tsx
index 4e90c0f861..558067cf2f 100644
--- a/web/src/components/tree-select.tsx
+++ b/web/src/components/tree-select.tsx
@@ -4,7 +4,13 @@ import {
PopoverTrigger,
} from '@/components/ui/popover';
import { cn } from '@/lib/utils';
-import { ChevronDown, ChevronRight, Search, TriangleAlert, X } from 'lucide-react';
+import {
+ ChevronDown,
+ ChevronRight,
+ Search,
+ TriangleAlert,
+ X,
+} from 'lucide-react';
import { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -96,8 +102,7 @@ export const TreeSelect = forwardRef<HTMLButtonElement, TreeSelectProps>(
// A value matching no node means the referenced option is gone (e.g.
// deleted) — unless `data` may simply not have loaded yet.
- const missingValue =
- value && !selectedNode && !loading ? value : undefined;
+ const missingValue = value && !selectedNode && !loading ? value : undefined;
const isLeaf = useCallback(
(node: TreeSelectNode) => !node.children?.length,
@@ -253,7 +258,9 @@ export const TreeSelect = forwardRef<HTMLButtonElement, TreeSelectProps>(
className,
)}
>
- <span className={cn('truncate', !selectedNode && 'text-slate-400')}>
+ <span
+ className={cn('truncate', !selectedNode && 'text-text-secondary')}
+ >
{missingValue ? (
renderMissingValue ? (
renderMissingValue(missingValue)
@@ -266,9 +273,7 @@ export const TreeSelect = forwardRef<HTMLButtonElement, TreeSelectProps>(
) : renderSelected ? (
renderSelected(selectedNode)
) : (
- selectedNode?.title ||
- placeholder ||
- t('common.pleaseSelect')
+ selectedNode?.title || placeholder || t('common.pleaseSelect')
)}
</span>
<div className="flex items-center ml-2 flex-shrink-0">
@@ -290,10 +295,10 @@ export const TreeSelect = forwardRef<HTMLButtonElement, TreeSelectProps>(
>
{showSearch && (
<div className="flex items-center border-b px-3 py-2">
- <Search className="h-4 w-4 text-slate-400 mr-2 flex-shrink-0" />
+ <Search className="h-4 w-4 mr-2 flex-shrink-0 text-text-disabled" />
<input
type="text"
- className="flex-1 bg-transparent text-sm outline-none placeholder:text-slate-400"
+ className="flex-1 bg-transparent text-sm outline-none placeholder:text-text-disabled"
placeholder={t('common.search')}
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
diff --git a/web/src/pages/dataset/setting/go/embedding-model-form-field.tsx b/web/src/pages/dataset/setting/go/embedding-model-form-field.tsx
index e472c594e7..3adfb45ef3 100644
--- a/web/src/pages/dataset/setting/go/embedding-model-form-field.tsx
+++ b/web/src/pages/dataset/setting/go/embedding-model-form-field.tsx
@@ -104,9 +104,7 @@ export function EmbeddingModelItem({
>
{t('embeddingModel')}
</FormLabel>
- <div
- className={cn('text-muted-foreground', { 'w-3/4': line === 1 })}
- >
+ <div className={cn('text-text-primary', { 'w-3/4': line === 1 })}>
<FormControl>
<EmbeddingSelect
isEdit={!!isEdit}
diff --git a/web/src/pages/dataset/setting/python/configuration/common-item.tsx b/web/src/pages/dataset/setting/python/configuration/common-item.tsx
index c7e1185f94..d09f08ffd6 100644
--- a/web/src/pages/dataset/setting/python/configuration/common-item.tsx
+++ b/web/src/pages/dataset/setting/python/configuration/common-item.tsx
@@ -186,9 +186,7 @@ export function EmbeddingModelItem({
>
{t('embeddingModel')}
</FormLabel>
- <div
- className={cn('text-muted-foreground', { 'w-3/4': line === 1 })}
- >
+ <div className={cn('text-text-primary', { 'w-3/4': line === 1 })}>
<FormControl>
<EmbeddingSelect
isEdit={!!isEdit}
@@ -500,9 +498,7 @@ export function LLMModelItem({
>
{label ?? t('llmModel')}
</FormLabel>
- <div
- className={cn('text-text-secondary', { 'w-3/4': line === 1 })}
- >
+ <div className={cn('text-text-primary', { 'w-3/4': line === 1 })}>
<FormControl>
<LLMSelect
isEdit={!!isEdit}