Commit e7621906 by Peter Holmberg Committed by Torkel Ödegaard

Inspect: table take full height in drawer (#21580)

parent 7cbf3d8d
......@@ -54,6 +54,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
`,
content: css`
padding: ${theme.spacing.md};
height: 100%;
`,
};
});
......
......@@ -10,7 +10,9 @@ interface Props {
const getTabContentStyle = stylesFactory((theme: GrafanaTheme) => {
return {
tabContent: css`
padding: ${theme.spacing.xs} 0;
padding: ${theme.spacing.xs};
height: 90%;
overflow: hidden;
`,
};
});
......
......@@ -136,7 +136,7 @@ export class PanelInspector extends PureComponent<Props, State> {
return <metaDS.components.MetadataInspector datasource={metaDS} data={data} />;
}
renderDataTab(width: number) {
renderDataTab(width: number, height: number) {
const { data, selected } = this.state;
const styles = getStyles();
if (!data || !data.length) {
......@@ -177,7 +177,7 @@ export class PanelInspector extends PureComponent<Props, State> {
</Forms.Button>
</div>
</div>
<Table width={width} height={400} data={processed[selected]} />
<Table width={width} height={height} data={processed[selected]} />
</div>
);
}
......@@ -211,14 +211,15 @@ export class PanelInspector extends PureComponent<Props, State> {
})}
</TabsBar>
<TabContent>
<AutoSizer disableHeight>
{({ width }) => {
<AutoSizer>
{({ width, height }) => {
if (width === 0) {
return null;
}
return (
<div style={{ width }}>
{tab === InspectTab.Data && this.renderDataTab(width)}
{tab === InspectTab.Data && this.renderDataTab(width, height)}
{tab === InspectTab.Meta && this.renderMetadataInspector()}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment