aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-04-30 11:08:40 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-04-30 11:08:40 +0530
commit62b362ffdfa135a61d1fda3f70f3dc63a706b7a1 (patch)
treeb1f88dde9403d05c5264e16b4cbbbabb0089591b /src
parentb6dfe84ecbb14da9b0c6c2d4aef4a34692e4abc3 (diff)
Fixed issues with empty price field
Diffstat (limited to 'src')
-rw-r--r--src/components/Form/RegisterItemForm.js6
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);