mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
Fix datalink suggestions (#33411)
This commit is contained in:
parent
18db387387
commit
6c7290164e
@ -32,7 +32,7 @@ export const OptionsPaneOptions: React.FC<Props> = (props) => {
|
||||
() => [getPanelFrameCategory(props), getVizualizationOptions(props), getFieldOverrideCategories(props)],
|
||||
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[panel.configRev]
|
||||
[panel.configRev, props.data]
|
||||
);
|
||||
|
||||
const mainBoxElements: React.ReactNode[] = [];
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { StandardEditorContext, VariableSuggestionsScope } from '@grafana/data';
|
||||
import { get as lodashGet, set as lodashSet } from 'lodash';
|
||||
import { getPanelOptionsVariableSuggestions } from 'app/features/panel/panellinks/link_srv';
|
||||
import { getDataLinksVariableSuggestions } from 'app/features/panel/panellinks/link_srv';
|
||||
import { OptionPaneRenderProps } from './types';
|
||||
import { updateDefaultFieldConfigValue } from './utils';
|
||||
import { OptionsPaneItemDescriptor } from './OptionsPaneItemDescriptor';
|
||||
@ -19,7 +19,7 @@ export function getVizualizationOptions(props: OptionPaneRenderProps): OptionsPa
|
||||
options: currentOptions,
|
||||
eventBus: dashboard.events,
|
||||
getSuggestions: (scope?: VariableSuggestionsScope) => {
|
||||
return getPanelOptionsVariableSuggestions(plugin, data?.series);
|
||||
return data ? getDataLinksVariableSuggestions(data.series, scope) : [];
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user