mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
use setItem to cause rerenders on point
This commit is contained in:
@ -169,15 +169,17 @@ export default function Scan() {
|
|||||||
.get(url)
|
.get(url)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
item.instance = response.data;
|
item.instance = response.data;
|
||||||
|
const list_idx = history.findIndex((i) => i.id === id);
|
||||||
|
historyHandlers.setItem(list_idx, item);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error('error while fetching instance data at', url);
|
console.error('error while fetching instance data at', url);
|
||||||
console.info(err);
|
console.info(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
historyHandlers.setState(history);
|
||||||
}
|
}
|
||||||
|
|
||||||
historyHandlers.setState(history);
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
// 400 and no plugin means no match
|
// 400 and no plugin means no match
|
||||||
|
Reference in New Issue
Block a user