Commit 7acea5b3 by Torkel Ödegaard Committed by GitHub

NewPanelEdit: Add back datalinks and new table panel fix (#22267)

* NewPanelEditor: Add back data links

* Made custom table options work in table panel
parent 4cf76583
......@@ -36,12 +36,13 @@ export const DataLinksValueEditor: React.FC<FieldConfigEditorProps<DataLink[], D
};
const onDataLinkAdd = () => {
const links = cloneDeep(value);
const links = cloneDeep(value) || [];
links.push({
title: '',
url: '',
});
onChange(links);
};
......
......@@ -148,5 +148,6 @@ export const getStandardFieldConfigs = () => {
StandardFieldConfigEditors.thresholds,
StandardFieldConfigEditors.title,
StandardFieldConfigEditors.noValue,
StandardFieldConfigEditors.links,
];
};
......@@ -6,6 +6,7 @@ import { Table } from '@grafana/ui';
import { PanelProps, applyFieldOverrides } from '@grafana/data';
import { Options } from './types';
import { config } from 'app/core/config';
import { tableFieldRegistry } from './custom';
interface Props extends PanelProps<Options> {}
......@@ -28,6 +29,7 @@ export class TablePanel extends Component<Props> {
fieldOptions: options.fieldOptions,
theme: config.theme,
replaceVariables,
custom: tableFieldRegistry,
})[0];
return <Table height={height - paddingBottom} width={width} data={dataProcessed} />;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment