mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Fix for react hook (#7151)
* Fix for react hook * Improve quantity input
This commit is contained in:
parent
acfd50372d
commit
7f12d55609
@ -143,7 +143,6 @@ function StockItemDefaultMove({
|
|||||||
stockItem: any;
|
stockItem: any;
|
||||||
value: any;
|
value: any;
|
||||||
}) {
|
}) {
|
||||||
console.log('item', stockItem);
|
|
||||||
const { data } = useSuspenseQuery({
|
const { data } = useSuspenseQuery({
|
||||||
queryKey: [
|
queryKey: [
|
||||||
'location',
|
'location',
|
||||||
@ -289,7 +288,7 @@ function StockOperationsRow({
|
|||||||
} else {
|
} else {
|
||||||
return `#${record.serial}`;
|
return `#${record.serial}`;
|
||||||
}
|
}
|
||||||
}, record);
|
}, [record]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr>
|
<tr>
|
||||||
@ -317,6 +316,7 @@ function StockOperationsRow({
|
|||||||
<NumberInput
|
<NumberInput
|
||||||
value={value}
|
value={value}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
|
disabled={!!record.serial && record.quantity == 1}
|
||||||
max={setMax ? record.quantity : undefined}
|
max={setMax ? record.quantity : undefined}
|
||||||
min={0}
|
min={0}
|
||||||
style={{ maxWidth: '100px' }}
|
style={{ maxWidth: '100px' }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user