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">
|
<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" />
|
||||||
|
|||||||
Reference in New Issue
Block a user