mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Table: Filter hidden fields for text wrapping (#89800)
This commit is contained in:
parent
655e477c20
commit
78f9c0fd41
@ -286,7 +286,8 @@ export const RowsList = (props: RowsListProps) => {
|
|||||||
|
|
||||||
// If there's a text wrapping field we set the height of it here
|
// If there's a text wrapping field we set the height of it here
|
||||||
if (textWrapField) {
|
if (textWrapField) {
|
||||||
const seriesIndex = data.fields.findIndex((field) => field.name === textWrapField.name);
|
const visibleFields = data.fields.filter((field) => !Boolean(field.config.custom?.hidden));
|
||||||
|
const seriesIndex = visibleFields.findIndex((field) => field.name === textWrapField.name);
|
||||||
const pxLineHeight = theme.typography.body.lineHeight * theme.typography.fontSize;
|
const pxLineHeight = theme.typography.body.lineHeight * theme.typography.fontSize;
|
||||||
const bbox = guessTextBoundingBox(
|
const bbox = guessTextBoundingBox(
|
||||||
textWrapField.values[index],
|
textWrapField.values[index],
|
||||||
@ -369,7 +370,8 @@ export const RowsList = (props: RowsListProps) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (textWrapField) {
|
if (textWrapField) {
|
||||||
const seriesIndex = data.fields.findIndex((field) => field.name === textWrapField.name);
|
const visibleFields = data.fields.filter((field) => !Boolean(field.config.custom?.hidden));
|
||||||
|
const seriesIndex = visibleFields.findIndex((field) => field.name === textWrapField.name);
|
||||||
const pxLineHeight = theme.typography.fontSize * theme.typography.body.lineHeight;
|
const pxLineHeight = theme.typography.fontSize * theme.typography.body.lineHeight;
|
||||||
return guessTextBoundingBox(
|
return guessTextBoundingBox(
|
||||||
textWrapField.values[index],
|
textWrapField.values[index],
|
||||||
|
Loading…
Reference in New Issue
Block a user