add scrollarea to settings

This commit is contained in:
2025-05-10 19:37:26 +02:00
parent f36310c727
commit 3f4abed839

View File

@@ -12,6 +12,7 @@ import {
} from '@/components/ui/dialog' } from '@/components/ui/dialog'
import { Input } from '@/components/ui/input' import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label' import { Label } from '@/components/ui/label'
import { ScrollArea } from '@/components/ui/scroll-area'
import { import {
Select, Select,
SelectContent, SelectContent,
@@ -450,13 +451,13 @@ function Settings() {
return ( return (
<div className='space-y-4'> <div className='space-y-4'>
<div className='flex items-center justify-between'> <div className='flex items-center justify-between px-4'>
<h3 className='font-medium text-lg'>Field Mappings</h3> <h3 className='font-medium text-lg'>Field Mappings</h3>
<Button onClick={addMapping} size='sm'> <Button onClick={addMapping} size='sm'>
Add Mapping Add Mapping
</Button> </Button>
</div> </div>
<ScrollArea className='h-[500px] p-4'>
<div className='space-y-2'> <div className='space-y-2'>
{mappings.map((mapping, index) => ( {mappings.map((mapping, index) => (
<div key={index} className='flex items-center gap-2'> <div key={index} className='flex items-center gap-2'>
@@ -468,8 +469,8 @@ function Settings() {
> >
<SelectTrigger className='w-[200px]'> <SelectTrigger className='w-[200px]'>
<SelectValue placeholder='Select field'> <SelectValue placeholder='Select field'>
{formFields.find((f) => f.id === mapping.formField)?.label || {formFields.find((f) => f.id === mapping.formField)
'Select field'} ?.label || 'Select field'}
</SelectValue> </SelectValue>
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent>
@@ -551,6 +552,7 @@ function Settings() {
))} ))}
</div> </div>
</div> </div>
</ScrollArea>
</div> </div>
) )
} }