Table: Fix no data message alignment and table selector name (#77700)

* on multiple queries show no data message aligned + set a default table name for empty series

* simplify style

* check if there are fields
This commit is contained in:
Victor Marin 2023-11-07 11:13:19 +02:00 committed by GitHub
parent f7c4909553
commit f6c5b80cca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ export function getFrameDisplayName(frame: DataFrame, index?: number) {
}
// list all the
if (index === undefined) {
if (index === undefined && frame.fields.length > 0) {
return frame.fields
.filter((f) => f.type !== FieldType.time)
.map((f) => getFieldDisplayName(f, frame))

View File

@ -372,7 +372,7 @@ export const Table = memo((props: Props) => {
</CustomScrollbar>
</div>
) : (
<div style={{ height: height - headerHeight }} className={tableStyles.noData}>
<div style={{ height: height - headerHeight, width }} className={tableStyles.noData}>
No data
</div>
)}