mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Canvas: Fix datalinks using field variable (#87265)
This commit is contained in:
parent
f8d9f8541b
commit
6c7485129b
@ -119,7 +119,9 @@ const addDataLinkForField = (
|
||||
): void => {
|
||||
if (field?.getLinks) {
|
||||
const disp = field.display ? field.display(data) : { text: `${data}`, numeric: +data! };
|
||||
field.getLinks({ calculatedValue: disp }).forEach((link) => {
|
||||
// TODO add more control over which row index each element uses
|
||||
const valueRowIndex = field.values.length - 1;
|
||||
field.getLinks({ calculatedValue: disp, valueRowIndex }).forEach((link) => {
|
||||
const key = `${link.title}/${link.href}`;
|
||||
if (!linkLookup.has(key)) {
|
||||
links.push(link);
|
||||
|
Loading…
Reference in New Issue
Block a user