<SelectTrigger asChild>
<Button
variant="outline"
role="combobox"
className={cn(
"w-[200px] justify-between",
!field.value &&
"text-muted-foreground",
)}
>
<>
{field.value
? getAllFormFactors.data?.find(
(formFactor) =>
formFactor.id === field.value,
)?.name
: "Select form factor"}
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
</>
</Button>
</SelectTrigger>
I tried replacing the button with a simple div
, the error still throws, the error is gone once I remove asChild
New contributor
symphony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.