This commit is contained in:
Stephen Zhou
2026-01-20 14:26:01 +08:00
parent 951a580907
commit d4ed398e4f
4 changed files with 90 additions and 104 deletions

View File

@ -327,11 +327,11 @@ const FormInputItem: FC<Props> = ({
: newType ?? (varInput?.type === VarKindType.mention ? VarKindType.mention : getVarKindType())
const resolvedMentionConfig = resolvedType === VarKindType.mention
? (mentionConfig ?? varInput?.mention_config ?? {
extractor_node_id: '',
output_selector: [],
null_strategy: 'use_default',
default_value: '',
})
extractor_node_id: '',
output_selector: [],
null_strategy: 'use_default',
default_value: '',
})
: undefined
onChange({
@ -504,13 +504,13 @@ const FormInputItem: FC<Props> = ({
placeholder={placeholder?.[language] || placeholder?.en_US}
renderOption={options.some((opt: any) => opt.icon)
? ({ item }) => (
<div className="flex items-center">
{item.icon && (
<img src={item.icon} alt="" className="mr-2 h-4 w-4" />
)}
<span>{item.name}</span>
</div>
)
<div className="flex items-center">
{item.icon && (
<img src={item.icon} alt="" className="mr-2 h-4 w-4" />
)}
<span>{item.name}</span>
</div>
)
: undefined}
/>
)}
@ -615,14 +615,14 @@ const FormInputItem: FC<Props> = ({
<span className="absolute inset-y-0 right-0 flex items-center pr-2">
{isLoadingOptions
? (
<RiLoader4Line className="h-3.5 w-3.5 animate-spin text-text-secondary" />
)
<RiLoader4Line className="h-3.5 w-3.5 animate-spin text-text-secondary" />
)
: (
<ChevronDownIcon
className="h-4 w-4 text-text-quaternary group-hover/simple-select:text-text-secondary"
aria-hidden="true"
/>
)}
<ChevronDownIcon
className="h-4 w-4 text-text-quaternary group-hover/simple-select:text-text-secondary"
aria-hidden="true"
/>
)}
</span>
</ListboxButton>
<ListboxOptions className="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur px-1 py-1 text-base shadow-lg backdrop-blur-sm focus:outline-none sm:text-sm">

View File

@ -5,7 +5,6 @@ import { RiAlertFill, RiQuestionLine } from '@remixicon/react'
import * as React from 'react'
import { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import Badge from '@/app/components/base/badge'
import AddButton2 from '@/app/components/base/button/add-button'
import Switch from '@/app/components/base/switch'
import Toast from '@/app/components/base/toast'