InspectDrawer: Fixes issue with double scrollbars (#67884)

* InspectDrawer: Fixes issue with double scrollbars

* Fixed minor issue
This commit is contained in:
Torkel Ödegaard 2023-05-05 09:54:43 +02:00 committed by GitHub
parent 21459c7c97
commit fcb14d2548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 7 deletions

View File

@ -318,7 +318,14 @@ export const Table = memo((props: Props) => {
};
return (
<div {...getTableProps()} className={tableStyles.table} aria-label={ariaLabel} role="table" ref={tableDivRef}>
<div
{...getTableProps()}
className={tableStyles.table}
aria-label={ariaLabel}
role="table"
ref={tableDivRef}
style={{ width, height }}
>
<CustomScrollbar hideVerticalTrack={true}>
<div className={tableStyles.tableContentWrapper(totalColumnsWidth)}>
{!noHeader && (

View File

@ -285,11 +285,7 @@ export class InspectDataTab extends PureComponent<Props, State> {
return null;
}
return (
<div style={{ width, height }}>
<Table width={width} height={height} data={dataFrame} showTypeIcons={true} />
</div>
);
return <Table width={width} height={height} data={dataFrame} showTypeIcons={true} />;
}}
</AutoSizer>
</div>

View File

@ -17,6 +17,7 @@ export const getPanelInspectorStyles2 = (theme: GrafanaTheme2) => {
height: 100%;
width: 100%;
flex: 1 1 0;
min-height: 0;
`,
toolbar: css`
display: flex;
@ -32,7 +33,6 @@ export const getPanelInspectorStyles2 = (theme: GrafanaTheme2) => {
content: css`
flex-grow: 1;
height: 100%;
overflow: scroll;
`,
editor: css`
font-family: monospace;