2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +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)
.then((response) => {
item.instance = response.data;
const list_idx = history.findIndex((i) => i.id === id);
historyHandlers.setItem(list_idx, item);
})
.catch((err) => {
console.error('error while fetching instance data at', url);
console.info(err);
});
}
} else {
historyHandlers.setState(history);
}
historyHandlers.setState(history);
})
.catch((err) => {
// 400 and no plugin means no match