Previously when forceRender was called, for example when a change in the VizPanel's dependency config was detected, the VizPanelRenderer component itself would indeed re-render, but its children could potentially be pure components, like the StatPanel component, or they could be wrapped in VizRepeater, which is also pure, causing them not to re-render. These components won't re-render in cases where, for example, the panel contains data links containing template variables, as the field config object itself hasn't changed, just the value at which the variable points. By incrementing the _renderCounter when forceRender is called, panel components are also force to re-render.
📦 Published PR as canary version: 5.23.0--canary.954.11668840775.0
:sparkles: Test out this PR locally via:
```bash
npm install @grafana/scenes-react@5.23.0--canary.954.11668840775.0
npm install @grafana/scenes@5.23.0--canary.954.11668840775.0
# or
yarn add @grafana/scenes-react@5.23.0--canary.954.11668840775.0
yarn add @grafana/scenes@5.23.0--canary.954.11668840775.0
```
Previously when
forceRender
was called, for example when a change in the VizPanel's dependency config was detected, the VizPanelRenderer component itself would indeed re-render, but its children could potentially be pure components, like the StatPanel component, or they could be wrapped in VizRepeater, which is also pure, causing them not to re-render. These components won't re-render in cases where, for example, the panel contains data links containing template variables, as the field config object itself hasn't changed, just the value at which the variable points. By incrementing the_renderCounter
whenforceRender
is called, panel components are also force to re-render.📦 Published PR as canary version:
5.23.0--canary.954.11668840775.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes-react@5.23.0--canary.954.11668840775.0 npm install @grafana/scenes@5.23.0--canary.954.11668840775.0 # or yarn add @grafana/scenes-react@5.23.0--canary.954.11668840775.0 yarn add @grafana/scenes@5.23.0--canary.954.11668840775.0 ```