Fix container width not being set after latest scenes update (#76372)

* Fix container width after latest scenes update

* typecheck
pull/75600/head^2
Dominik Prokop 2 years ago committed by GitHub
parent c2cbb0a924
commit 46dc898a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      public/app/features/dashboard-scene/utils/test-utils.ts

@ -52,6 +52,12 @@ export function activateFullSceneTree(scene: SceneObject): SceneDeactivationHand
const deactivationHandlers: SceneDeactivationHandler[] = [];
scene.forEachChild((child) => {
// For query runners which by default use the container width for maxDataPoints calculation we are setting a width.
// In real life this is done by the React component when VizPanel is rendered.
if ('setContainerWidth' in child) {
// @ts-expect-error
child.setContainerWidth(500);
}
deactivationHandlers.push(activateFullSceneTree(child));
});

Loading…
Cancel
Save