I set isResizable
to true
in SceneGridItem
, but the panel’s resize handler doesn’t show up, and resizing doesn’t work.
import {
EmbeddedScene,
PanelBuilders,
SceneApp,
SceneAppPage,
SceneGridItem,
SceneGridLayout,
VariableValueSelectors,
} from '@grafana/scenes';
import { ROUTES } from '../../constants';
import { prefixRoute } from 'utils/utils.routing';
const getGridLayoutScene = () => {
return new EmbeddedScene({
body: new SceneGridLayout({
isResizable: true,
isDraggable: true,
children: [
new SceneGridItem({
x: 0,
y: 0,
width: 50,
height: 5,
isResizable: true,
isDraggable: true,
body: PanelBuilders.timeseries().setTitle('Outsider').build(),
}),
new SceneGridItem({
x: 0,
y: 0,
width: 20,
height: 5,
isResizable: true,
isDraggable: true,
body: PanelBuilders.timeseries().setTitle('Outsider2').build(),
}),
],
}),
});
};
export const getScene = () => {
return new SceneApp({
name: 'Resizable',
pages: [
new SceneAppPage({
title: 'Resizable',
url: prefixRoute(ROUTES.Resizable),
controls: [new VariableValueSelectors({})],
getScene: getGridLayoutScene,
}),
],
});
};