Release Notes
Layout: Create atomic, layout specific objects (#97)
The interface of SceneFlexLayout and SceneGridLayout has changed. These scene objects now accept only dedicated layout item objects as children:
SceneFlexItemforSceneFlexLayoutSceneGridItemandSceneGridRowforSceneGridLayout
placement property has been replaced by those layout-specific objects.
Example
// BEFORE
const layout = new SceneFlexLayout({
direction: 'column',
children: [
new VizPanel({
placement: {
width: '50%',
height: '400',
},
...
})
],
...
})
// AFTER
const layout = new SceneFlexLayout({
direction: 'column',
children: [
new SceneFlexItem({
width: '50%',
height: '400',
body: new VizPanel({ ... }),
}),
],
...
})🚀 Enhancement
@grafana/scenes