2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

use setItem to cause rerenders on point

This commit is contained in:
Matthias Mair
2024-05-05 23:54:36 +02:00
parent 6719eb810b
commit 06f7ce3def

View File

@ -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