mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Field config: Respect config paths when rendering default value of field config property (#27652)
This commit is contained in:
parent
564d7ecea7
commit
e5b16952c7
@ -1,5 +1,5 @@
|
||||
import React, { ReactNode, useCallback } from 'react';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import { get as lodashGet, cloneDeep } from 'lodash';
|
||||
import {
|
||||
DataFrame,
|
||||
DocsId,
|
||||
@ -146,9 +146,9 @@ export const DefaultFieldConfigEditor: React.FC<Props> = ({ data, onChange, conf
|
||||
const defaults = config.defaults;
|
||||
const value = item.isCustom
|
||||
? defaults.custom
|
||||
? defaults.custom[item.path]
|
||||
? lodashGet(defaults.custom, item.path)
|
||||
: undefined
|
||||
: (defaults as any)[item.path];
|
||||
: lodashGet(defaults, item.path);
|
||||
|
||||
let label: ReactNode | undefined = (
|
||||
<Label description={item.description} category={item.category?.slice(1)}>
|
||||
|
Loading…
Reference in New Issue
Block a user