diff options
Diffstat (limited to 'src/components/Form/AddNewItemForm.js')
-rw-r--r-- | src/components/Form/AddNewItemForm.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/Form/AddNewItemForm.js b/src/components/Form/AddNewItemForm.js index 9286ba7..d82771a 100644 --- a/src/components/Form/AddNewItemForm.js +++ b/src/components/Form/AddNewItemForm.js @@ -25,7 +25,7 @@ const AddNewItemForm = (props) => { // Extract the model names from savedItems let savedItemNames= []; - if (props.savedItems !== []) { + if (props.savedItems !== null) { for (let i = 0; i < props.savedItems.length; i++) { savedItemNames.push(props.savedItems[i].Model); } @@ -39,11 +39,13 @@ const AddNewItemForm = (props) => { const desc = props.savedItems[i].Description; const price = props.savedItems[i].Price; const hsn = props.savedItems[i].HSN; + const gst = props.savedItems[i].GST; if (mod === itemName) { setItemDescValue(desc); setItemPriceValue(price); setItemHSNValue(hsn); + setItemGSTValue(gst); break; } } |