Skip to content

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

Fix: Add a custom placeholder to SelectWithSearch (#18719)

balibabu41fa68d5e573
diff --git a/web/src/components/originui/select-with-search.tsx b/web/src/components/originui/select-with-search.tsx
index 41eb7b0e7e..f968fb7b07 100644
--- a/web/src/components/originui/select-with-search.tsx
+++ b/web/src/components/originui/select-with-search.tsx
@@ -290,7 +290,11 @@ export const SelectWithSearch = forwardRef<
<Command className="p-5" filter={filterFn}>
{showSearch && (
<CommandInput
- placeholder={t('common.search') + '...'}
+ placeholder={
+ allowCustomValue
+ ? t('common.searchOrEnterToAdd') + '...'
+ : t('common.search') + '...'
+ }
className=" placeholder:text-text-disabled"
value={searchValue}
onValueChange={setSearchValue}
diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts
index f1d3f6abd8..9896b8f764 100644
--- a/web/src/locales/en.ts
+++ b/web/src/locales/en.ts
@@ -76,6 +76,7 @@ export default {
search: 'Search',
reset: 'Reset',
noDataFound: 'No data found.',
+ searchOrEnterToAdd: 'Search or enter to add',
noData: 'No data available',
promptPlaceholder: `Please input or use / to quickly insert variables.`,
mcp: {
@@ -2277,7 +2278,7 @@ Example: Virtual Hosted Style`,
fieldRule: 'Rule',
addField: 'Add field',
editField: 'Edit field',
- selectFieldType: 'Select field type',
+ selectFieldType: 'Select or enter a field type',
fieldTypeExists: 'This field type already exists',
example: 'Example',
instruction: 'Instruction',
diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts
index e2cdc3d89b..e699c5dca7 100644
--- a/web/src/locales/zh.ts
+++ b/web/src/locales/zh.ts
@@ -64,6 +64,7 @@ export default {
search: '搜索',
reset: '重置',
noDataFound: '没有找到数据。',
+ searchOrEnterToAdd: '搜索或输入后回车添加',
noData: '暂无数据',
bedrockCredentialsHint:
'提示:ACCESS KEY / SECRET KEY 可留空,以启用 AWS IAM 自动验证。',
@@ -1920,7 +1921,7 @@ NER:使用 spaCy NER 和基于规则的关键词提取来抽取 Entities 和 R
fieldRule: '规则',
addField: '添加字段',
editField: '编辑字段',
- selectFieldType: '选择字段类型',
+ selectFieldType: '选择或输入字段类型',
fieldTypeExists: '该字段类型已存在',
example: '示例',
instruction: 'Instruction',