Update content.tsx Add Search Functionality to Dropdown Component

pull/22474/head
AuditAIH 10 months ago committed by GitHub
parent 1c060e5f1e
commit d11169481a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -6,6 +6,7 @@ import Textarea from '@/app/components/base/textarea'
import { PortalSelect } from '@/app/components/base/select' import { PortalSelect } from '@/app/components/base/select'
import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uploader' import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uploader'
import { InputVarType } from '@/app/components/workflow/types' import { InputVarType } from '@/app/components/workflow/types'
import Select from '@/app/components/base/select'
type Props = { type Props = {
showTip?: boolean showTip?: boolean
@ -71,13 +72,14 @@ const InputsFormContent = ({ showTip }: Props) => {
/> />
)} )}
{form.type === InputVarType.select && ( {form.type === InputVarType.select && (
<PortalSelect <Select
popupClassName='w-[200px]' placeholder={form.label}
value={inputsFormValue?.[form.variable]} className='w-full'
items={form.options.map((option: string) => ({ value: option, name: option }))} defaultValue={inputsFormValue?.[form.variable]}
onSelect={item => handleFormChange(form.variable, item.value as string)} onSelect={item => handleFormChange(form.variable, item.value as string)}
placeholder={form.label} items={form.options.map((option: string) => ({ value: option, name: option }))}
/> allowSearch={true}
/>
)} )}
{form.type === InputVarType.singleFile && ( {form.type === InputVarType.singleFile && (
<FileUploaderInAttachmentWrapper <FileUploaderInAttachmentWrapper

Loading…
Cancel
Save