2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Re-render panels when context changes (#8407)

This commit is contained in:
Oliver 2024-11-02 11:59:40 +11:00 committed by GitHub
parent 18e5b0df58
commit cc6a2f4548
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,6 +76,7 @@ export function usePluginPanels({
// Cache the context data which is delivered to the plugins
const inventreeContext = useInvenTreeContext();
const contextData = useMemo<PluginPanelContext>(() => {
return {
model: model,
@ -83,7 +84,7 @@ export function usePluginPanels({
instance: instance,
...inventreeContext
};
}, [model, id, instance]);
}, [model, id, instance, inventreeContext]);
const pluginPanels: PanelType[] = useMemo(() => {
return (