mirror of
https://github.com/grafana/grafana.git
synced 2024-12-28 18:01:40 -06:00
Canvas: Remove null
data links (#91859)
This commit is contained in:
parent
38957b32ab
commit
f6b55ced6f
@ -112,7 +112,7 @@ export const DataLinksInlineEditor = ({
|
||||
const key = `${link.title}/${idx}`;
|
||||
|
||||
const linkJSX = (
|
||||
<div className={styles.itemWrapper}>
|
||||
<div className={styles.itemWrapper} key={key}>
|
||||
<DataLinksListItem
|
||||
key={key}
|
||||
index={idx}
|
||||
|
@ -373,6 +373,8 @@ export class ElementState implements LayerElement {
|
||||
const scene = this.getScene();
|
||||
const frames = scene?.data?.series;
|
||||
|
||||
this.options.links = this.options.links?.filter((link) => link !== null);
|
||||
|
||||
if (frames) {
|
||||
const defaultField = {
|
||||
name: 'Default field',
|
||||
|
@ -54,7 +54,7 @@ export const canvasMigrationHandler = (panel: PanelModel): Partial<Options> => {
|
||||
// append override links to elements with dimensions mapped to same field name
|
||||
for (const prop of override.properties) {
|
||||
if (prop.id === 'links') {
|
||||
addLinks(panel.options.root.elements, prop.value, override.matcher.options);
|
||||
addLinks(panel.options.root.elements, prop.value ?? [], override.matcher.options);
|
||||
} else {
|
||||
props.push(prop);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user