fix: scanning modal fixed close on scan
This commit is contained in:
@@ -20,10 +20,10 @@ const ScanningModal = ({
|
||||
|
||||
useWindowEvent("keydown", (event) => {
|
||||
event.preventDefault();
|
||||
console.log(inputValues);
|
||||
setInputValues(prevState => prevState + event.key);
|
||||
if (event.key === "Enter") {
|
||||
onScan(inputValues);
|
||||
setInputValues("");
|
||||
if (closeOnScan) {
|
||||
context.closeContextModal(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user