From e8593fa6576f6bbc012c4b1237b3f55474131fab Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 2 Apr 2023 13:33:36 -0700 Subject: [PATCH] another adjustment for partnumber changes --- Binner/Binner.Web/ClientApp/src/pages/Inventory.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Binner/Binner.Web/ClientApp/src/pages/Inventory.js b/Binner/Binner.Web/ClientApp/src/pages/Inventory.js index b62c1946..8d94b6bf 100644 --- a/Binner/Binner.Web/ClientApp/src/pages/Inventory.js +++ b/Binner/Binner.Web/ClientApp/src/pages/Inventory.js @@ -488,6 +488,7 @@ export function Inventory(props) { partNumber: cleanPartNumber, barcode: input.correctedValue }; + setInputPartNumber(cleanPartNumber); fetchBarcodeMetadata(e, scannedPart, (partInfo) => { // barcode found // console.log("Barcode info found!", partInfo); @@ -971,7 +972,7 @@ export function Inventory(props) { // check if the input looks like a barcode scanner tag, in case it's used when a text input has focus if (searchPartNumber && typeof control.value === "string" && control.value.includes("[)>")) { - // console.log('barcode input detected, switching mode'); + console.log('barcode input detected, switching mode'); enableKeyboardListening(); setKeyboardPassThrough("[)>"); control.value = ""; @@ -1813,7 +1814,7 @@ export function Inventory(props) { - {!isEditing &&
{part.partNumber && Suggested part number: handleSetSuggestedPartNumber(e, part.partNumber)}>{part.partNumber}}
} + {!isEditing &&
{part.partNumber && part.PartNumber !== inputPartNumber && Suggested part number: handleSetSuggestedPartNumber(e, part.partNumber)}>{part.partNumber}}
}