diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-04-30 11:08:40 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-04-30 11:08:40 +0530 |
commit | 62b362ffdfa135a61d1fda3f70f3dc63a706b7a1 (patch) | |
tree | b1f88dde9403d05c5264e16b4cbbbabb0089591b | |
parent | b6dfe84ecbb14da9b0c6c2d4aef4a34692e4abc3 (diff) |
Fixed issues with empty price field
-rw-r--r-- | src/components/Form/RegisterItemForm.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/Form/RegisterItemForm.js b/src/components/Form/RegisterItemForm.js index 864a146..1e2f32d 100644 --- a/src/components/Form/RegisterItemForm.js +++ b/src/components/Form/RegisterItemForm.js @@ -19,9 +19,9 @@ import "./Form.css"; const RegisterItemForm = (props) => { const [newItemNameValue, setNewItemNameValue] = useState(""); const [newItemDescValue, setNewItemDescValue] = useState(""); - const [newItemPriceValue, setNewItemPriceValue] = useState(""); + const [newItemPriceValue, setNewItemPriceValue] = useState(0.00); const [newItemHSNValue, setNewItemHSNValue] = useState(""); - const [newItemGSTValue, setNewItemGSTValue] = useState(""); + const [newItemGSTValue, setNewItemGSTValue] = useState(props.defGSTValue); // const [newItemBrandValue, setNewItemBrandValue] = useState(""); // const [newItemTypeValue, setNewItemTypeValue] = useState(""); @@ -72,7 +72,7 @@ const RegisterItemForm = (props) => { <div className={"numericInputs"}> <label> - Price: <input type="number" min="1.00" step="0.001" value={newItemPriceValue} onChange={ + Price: <input type="number" min="0.00" step="0.001" value={newItemPriceValue} onChange={ (event) => { const value = event.target.value; setNewItemPriceValue(value); |