mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
GeoMap: Fix tooltip not showing values (#53738)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
|
||||
import { ArrayDataFrame } from '@grafana/data';
|
||||
|
||||
import { DataHoverView } from './DataHoverView';
|
||||
|
||||
describe('DataHoverView component', () => {
|
||||
it('should default to multi mode if mode is null or undefined', () => {
|
||||
const data = new ArrayDataFrame([{ foo: 'bar' }]);
|
||||
render(<DataHoverView data={data} rowIndex={0} />);
|
||||
|
||||
expect(screen.queryByText('bar')).toBeInTheDocument();
|
||||
});
|
||||
});
|
@@ -61,7 +61,7 @@ export const DataHoverView = ({ data, rowIndex, columnIndex, sortOrder, mode }:
|
||||
return (
|
||||
<table className={styles.infoWrap}>
|
||||
<tbody>
|
||||
{(mode === TooltipDisplayMode.Multi || mode === null) &&
|
||||
{(mode === TooltipDisplayMode.Multi || mode == null) &&
|
||||
displayValues.map((v, i) => (
|
||||
<tr key={`${i}/${rowIndex}`} className={i === columnIndex ? styles.highlight : ''}>
|
||||
<th>{v[0]}:</th>
|
||||
|
Reference in New Issue
Block a user