mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
Table panel: Fix horizontal scrolling when pagination is enabled (#47776)
* Table panel: Fix horizontal scrolling when pagination is enabled * Fix failing test
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -304,9 +304,9 @@ export const Table: FC<Props> = memo((props: Props) => {
|
|||||||
totalColumnsWidth={totalColumnsWidth}
|
totalColumnsWidth={totalColumnsWidth}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{paginationEl}
|
|
||||||
</div>
|
</div>
|
||||||
</CustomScrollbar>
|
</CustomScrollbar>
|
||||||
|
{paginationEl}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -184,6 +184,9 @@ export const getTableStyles = (theme: GrafanaTheme2) => {
|
|||||||
div:not(:only-child):first-child {
|
div:not(:only-child):first-child {
|
||||||
flex-grow: 0.6;
|
flex-grow: 0.6;
|
||||||
}
|
}
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
`,
|
`,
|
||||||
paginationSummary: css`
|
paginationSummary: css`
|
||||||
color: ${theme.colors.text.secondary};
|
color: ${theme.colors.text.secondary};
|
||||||
@@ -191,11 +194,16 @@ export const getTableStyles = (theme: GrafanaTheme2) => {
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
`,
|
`,
|
||||||
|
|
||||||
tableContentWrapper: (totalColumnsWidth: number) => css`
|
tableContentWrapper: (totalColumnsWidth: number) => {
|
||||||
width: ${totalColumnsWidth ?? '100%'};
|
const width = totalColumnsWidth !== undefined ? `${totalColumnsWidth}px` : '100%';
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
return css`
|
||||||
`,
|
label: tableContentWrapper;
|
||||||
|
width: ${width};
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
`;
|
||||||
|
},
|
||||||
row: css`
|
row: css`
|
||||||
label: row;
|
label: row;
|
||||||
border-bottom: 1px solid ${borderColor};
|
border-bottom: 1px solid ${borderColor};
|
||||||
|
|||||||
Reference in New Issue
Block a user