Added Emplyee Access missing names
This commit is contained in:
parent
579d4f2a3a
commit
42d10ccb5a
|
|
@ -180,12 +180,20 @@ const CreateTransfer = () => {
|
|||
variant ? `Already added in the table` : 'This product is already Added'
|
||||
);
|
||||
}
|
||||
if (scanner) {
|
||||
setTimeout(() => {
|
||||
productInputRef.current?.focus();
|
||||
setProductSearchText('');
|
||||
}, 100);
|
||||
}
|
||||
|
||||
formProductRef?.current?.resetFields();
|
||||
if (!scanner) {
|
||||
setProductSearchText('');
|
||||
}
|
||||
|
||||
return success;
|
||||
}, []);
|
||||
}, [scanner]);
|
||||
|
||||
const focusProductInput = () => {
|
||||
// give React a tick to close modal/input blur before refocusing
|
||||
|
|
@ -367,7 +375,13 @@ const CreateTransfer = () => {
|
|||
setVariantDetails([]);
|
||||
setSelectedProductForVariant(null);
|
||||
setSelectedVariants([]);
|
||||
focusProductInput();
|
||||
|
||||
if (scanner) {
|
||||
setTimeout(() => {
|
||||
productInputRef.current?.focus();
|
||||
setProductSearchText('');
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
|
||||
const handleDeleteRow = (index) => {
|
||||
|
|
@ -618,7 +632,13 @@ const CreateTransfer = () => {
|
|||
setVariantDetails([]);
|
||||
setSelectedProductForVariant(null);
|
||||
setSelectedVariants([]);
|
||||
focusProductInput();
|
||||
|
||||
if (scanner) {
|
||||
setTimeout(() => {
|
||||
productInputRef.current?.focus();
|
||||
setProductSearchText('');
|
||||
}, 100);
|
||||
}
|
||||
}}
|
||||
onOk={handleAddSelectedVariants}
|
||||
okText="Add Selected Variants"
|
||||
|
|
|
|||
Loading…
Reference in New Issue