Update product-modal.tsx

This commit is contained in:
NotII
2025-06-09 22:10:07 +01:00
parent b77f0d007d
commit 05ec33aa9d

View File

@@ -407,12 +407,13 @@ const UnitTypeSelect: React.FC<{
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<Select <Select
value={value || "placeholder"} value={value || "placeholder"}
onValueChange={(val) => onValueChange={(val) => {
if (val === "placeholder") return;
setProductData((prev) => ({ setProductData((prev) => ({
...prev, ...prev,
unitType: val === "placeholder" ? "" : val, unitType: val as 'pcs' | 'gr' | 'kg' | 'ml',
})) }));
} }}
> >
<SelectTrigger className="h-9 text-sm"> <SelectTrigger className="h-9 text-sm">
<SelectValue placeholder="Select unit type" /> <SelectValue placeholder="Select unit type" />