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:
parent
18e5b0df58
commit
cc6a2f4548
@ -76,6 +76,7 @@ export function usePluginPanels({
|
|||||||
|
|
||||||
// Cache the context data which is delivered to the plugins
|
// Cache the context data which is delivered to the plugins
|
||||||
const inventreeContext = useInvenTreeContext();
|
const inventreeContext = useInvenTreeContext();
|
||||||
|
|
||||||
const contextData = useMemo<PluginPanelContext>(() => {
|
const contextData = useMemo<PluginPanelContext>(() => {
|
||||||
return {
|
return {
|
||||||
model: model,
|
model: model,
|
||||||
@ -83,7 +84,7 @@ export function usePluginPanels({
|
|||||||
instance: instance,
|
instance: instance,
|
||||||
...inventreeContext
|
...inventreeContext
|
||||||
};
|
};
|
||||||
}, [model, id, instance]);
|
}, [model, id, instance, inventreeContext]);
|
||||||
|
|
||||||
const pluginPanels: PanelType[] = useMemo(() => {
|
const pluginPanels: PanelType[] = useMemo(() => {
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user