Update product-modal.tsx
This commit is contained in:
@@ -407,12 +407,13 @@ const UnitTypeSelect: React.FC<{
|
||||
<div className="flex items-center space-x-2">
|
||||
<Select
|
||||
value={value || "placeholder"}
|
||||
onValueChange={(val) =>
|
||||
onValueChange={(val) => {
|
||||
if (val === "placeholder") return;
|
||||
setProductData((prev) => ({
|
||||
...prev,
|
||||
unitType: val === "placeholder" ? "" : val,
|
||||
}))
|
||||
}
|
||||
unitType: val as 'pcs' | 'gr' | 'kg' | 'ml',
|
||||
}));
|
||||
}}
|
||||
>
|
||||
<SelectTrigger className="h-9 text-sm">
|
||||
<SelectValue placeholder="Select unit type" />
|
||||
|
||||
Reference in New Issue
Block a user