Im trying to use CountrySelect in a shadcn component in Next.js
Unanswered
Kromfohrländer posted this in #help-forum
KromfohrländerOP
I want to use this
Inside this
I've been on it for HOURS and I can not figure it out... Is it even possible?
I've tried the obvious easiest way of modifying something which is just changing CountrySelect to SelectGroup, SelectContent etc but I get an error on "onChange" and it doesnt work. Done many other stuff as well. Reason I want this is because the dropdown is ugly and the shadcn component has everything. Im not being lazy, i tried modifying the CSS but I'm not getting expected results.
Attached entire code.
<CountrySelect
onChange={(e: {
id: SetStateAction<number>;
name: SetStateAction<string>;
}) => {
setCountryId(e.id);
setCountryFromName(e.name);
}}
placeHolder="Select Country"
/>
Inside this
<Select>
<SelectTrigger className="w-[180px]">
<SelectValue placeholder="Label placeholder" />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectLabel>Label</SelectLabel>
</SelectGroup>
</SelectContent>
</Select>
I've been on it for HOURS and I can not figure it out... Is it even possible?
I've tried the obvious easiest way of modifying something which is just changing CountrySelect to SelectGroup, SelectContent etc but I get an error on "onChange" and it doesnt work. Done many other stuff as well. Reason I want this is because the dropdown is ugly and the shadcn component has everything. Im not being lazy, i tried modifying the CSS but I'm not getting expected results.
Attached entire code.