mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Table: Fixes not data warning style (#33603)
* Table: Fixes not data warning style * Update Table.test.tsx
This commit is contained in:
parent
f2e4f41f69
commit
b165bfabc1
@ -104,7 +104,7 @@ describe('Table', () => {
|
||||
getTestContext({ data: toDataFrame([]) });
|
||||
expect(getTable()).toBeInTheDocument();
|
||||
expect(screen.queryByRole('row')).not.toBeInTheDocument();
|
||||
expect(screen.getByText(/no data to show/i)).toBeInTheDocument();
|
||||
expect(screen.getByText(/No data/i)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -223,7 +223,7 @@ export const Table: FC<Props> = memo((props: Props) => {
|
||||
</FixedSizeList>
|
||||
) : (
|
||||
<div style={{ height: height - headerHeight }} className={tableStyles.noData}>
|
||||
No data to show
|
||||
No data
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
@ -108,7 +108,7 @@ export class TablePanel extends Component<Props> {
|
||||
const hasFields = data.series[0]?.fields.length;
|
||||
|
||||
if (!count || !hasFields) {
|
||||
return <div>No data</div>;
|
||||
return <div className={tableStyles.noData}>No data</div>;
|
||||
}
|
||||
|
||||
if (count > 1) {
|
||||
@ -143,6 +143,13 @@ const tableStyles = {
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
`,
|
||||
noData: css`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
`,
|
||||
selectWrapper: css`
|
||||
padding: 8px;
|
||||
`,
|
||||
|
Loading…
Reference in New Issue
Block a user