i want to reset value of selected after submit for select other product .
i clear state that give value from that , any input empty but select option is stay on that selected value
<Select onValueChange={(value) =>
setSelected({ ...selected, [key]: value })
}>
<SelectTrigger className="w-full px-0 h-[16px] text-[13px] border-none">
<SelectValue placeholder={"select"} />
</SelectTrigger>
<SelectContent>
{productsList[key].map((item, index) => (
<SelectItem
key={index}
value={item}
className={`text-[12px] text-[#040714] p-1 `}
>
{item}
</SelectItem>
))}
</SelectContent>
</Select>
const cancelHandler = () => {
setSelected({});
};
<Button
variant="ghost"
disabled={!disalbleBtns}
className="p-0 h-6"
onClick={() => submitHandler()}
>
<SubmitSvg />
</Button>
you should do this :