Provide correct field scoped vars for data links interpolation (#25318)

This commit is contained in:
Dominik Prokop 2020-06-04 08:35:15 +02:00 committed by GitHub
parent ed92b41d47
commit 0f5b894256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -118,8 +118,8 @@ describe('applyFieldOverrides', () => {
"__field": Object { "__field": Object {
"text": "Field", "text": "Field",
"value": Object { "value": Object {
"label": undefined, "formattedLabels": "",
"labels": "", "labels": undefined,
"name": "A message", "name": "A message",
}, },
}, },
@ -137,8 +137,8 @@ describe('applyFieldOverrides', () => {
"__field": Object { "__field": Object {
"text": "Field", "text": "Field",
"value": Object { "value": Object {
"label": undefined, "formattedLabels": "",
"labels": "", "labels": undefined,
"name": "B info", "name": "B info",
}, },
}, },

View File

@ -112,8 +112,8 @@ export function applyFieldOverrides(options: ApplyFieldOverrideOptions): DataFra
text: 'Field', text: 'Field',
value: { value: {
name: displayName, // Generally appropriate (may include the series name if useful) name: displayName, // Generally appropriate (may include the series name if useful)
labels: formatLabels(field.labels!), formattedLabels: formatLabels(field.labels!),
label: field.labels, labels: field.labels,
}, },
}; };