Browse Source

Feat: Put buildSelectOptions to common-util.ts #3221 (#7875)

### What problem does this PR solve?

Feat: Put buildSelectOptions to common-util.ts #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
tags/v0.19.1
balibabu 5 months ago
parent
commit
590070e47d
No account linked to committer's email address

+ 1
- 1
web/src/pages/agent/form/begin-form/index.tsx View File

import { Switch } from '@/components/ui/switch'; import { Switch } from '@/components/ui/switch';
import { Textarea } from '@/components/ui/textarea'; import { Textarea } from '@/components/ui/textarea';
import { FormTooltip } from '@/components/ui/tooltip'; import { FormTooltip } from '@/components/ui/tooltip';
import { buildSelectOptions } from '@/utils/common-util';
import { buildSelectOptions } from '@/utils/component-util';
import { Plus } from 'lucide-react'; import { Plus } from 'lucide-react';
import { useCallback } from 'react'; import { useCallback } from 'react';
import { useWatch } from 'react-hook-form'; import { useWatch } from 'react-hook-form';

+ 0
- 4
web/src/utils/common-util.ts View File



return nextBytes.toFixed(dp) + ' ' + units[u]; return nextBytes.toFixed(dp) + ' ' + units[u];
} }

export function buildSelectOptions(list: Array<string>) {
return list.map((x) => ({ label: x, value: x }));
}

+ 3
- 0
web/src/utils/component-util.ts View File

export function buildSelectOptions(list: Array<string>) {
return list.map((x) => ({ label: x, value: x }));
}

Loading…
Cancel
Save