| @@ -408,19 +408,19 @@ const PoDetail: React.FC<Props> = ({ po, qc, warehouse }) => { | |||||
| const handleChange = useCallback(debounce((e: React.ChangeEvent<HTMLInputElement>) => { | const handleChange = useCallback(debounce((e: React.ChangeEvent<HTMLInputElement>) => { | ||||
| const raw = e.target.value; | const raw = e.target.value; | ||||
| const id = e.target.id | const id = e.target.id | ||||
| const temp = polInputList | |||||
| // const temp = polInputList | |||||
| switch (id) { | switch (id) { | ||||
| case "lotNo": | case "lotNo": | ||||
| if (raw.trim() === '') { | if (raw.trim() === '') { | ||||
| temp[rowIndex].lotNo = ''; | |||||
| polInputList[rowIndex].lotNo = ''; | |||||
| break; | break; | ||||
| } | } | ||||
| temp[rowIndex].lotNo = raw.trim(); | |||||
| polInputList[rowIndex].lotNo = raw.trim(); | |||||
| break; | break; | ||||
| case "dnQty": | case "dnQty": | ||||
| // Allow empty input | // Allow empty input | ||||
| if (raw.trim() === '') { | if (raw.trim() === '') { | ||||
| temp[rowIndex].dnQty = 0; | |||||
| polInputList[rowIndex].dnQty = 0; | |||||
| break; | break; | ||||
| } | } | ||||
| @@ -433,7 +433,7 @@ const PoDetail: React.FC<Props> = ({ po, qc, warehouse }) => { | |||||
| // Parse and clamp to non-negative integer | // Parse and clamp to non-negative integer | ||||
| const next = Math.max(0, Math.floor(Number(cleaned))); | const next = Math.max(0, Math.floor(Number(cleaned))); | ||||
| temp[rowIndex].dnQty = next; | |||||
| polInputList[rowIndex].dnQty = next; | |||||
| break; | break; | ||||
| default: | default: | ||||
| break; | break; | ||||