-
- setBarcode(event.target.value)}
- placeholder={t("inventory.dialog.barcodePlaceholder")}
- value={barcode}
- />
-
-
+ setBarcode(event.target.value)}
+ // A hardware scanner sends Enter after the code; parse it here
+ // (instead of submitting the form) so a scan into this field is
+ // handled like the global wedge burst.
+ onKeyDown={(event) => {
+ if (event.key === "Enter") {
+ event.preventDefault();
+ if (barcode.trim()) handleScan(barcode);
+ }
+ }}
+ placeholder={t("inventory.dialog.barcodePlaceholder")}
+ value={barcode}
+ />
+
+ {t("inventory.dialog.scanHint")}
+
@@ -235,11 +288,5 @@ export function AddInventoryDialog({