Fix Select.Item value error

The AI will address the "A <Select.Item /> must have a value prop that is not an empty string" error. It will review the code, particularly the `Select.Item` components, to ensure that the `value` prop is always populated with a non-empty string.
This commit is contained in:
gpt-engineer-app[bot] 2025-06-06 18:56:29 +00:00
parent bfdd935853
commit cb3f41b8ff

View File

@ -29,8 +29,8 @@ export function GroupSelectField({ form, grupos }: GroupSelectFieldProps) {
<FormItem>
<FormLabel>Grupo (Opcional)</FormLabel>
<Select
onValueChange={(value) => field.onChange(value || null)}
value={field.value || ""}
onValueChange={(value) => field.onChange(value === "none" ? null : value)}
value={field.value || "none"}
>
<FormControl>
<SelectTrigger>
@ -38,7 +38,7 @@ export function GroupSelectField({ form, grupos }: GroupSelectFieldProps) {
</SelectTrigger>
</FormControl>
<SelectContent>
<SelectItem value="">Nenhum grupo</SelectItem>
<SelectItem value="none">Nenhum grupo</SelectItem>
{gruposValidos.map((grupo) => (
<SelectItem
key={grupo.remote_jid}