Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
94f87c72
Unverified
Commit
94f87c72
authored
Apr 10, 2020
by
Dominik Prokop
Committed by
GitHub
Apr 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix react missing key warnings (#23498)
parent
32555fc7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx
+2
-2
public/app/features/dashboard/components/PanelEditor/PanelOptionsEditor.tsx
+4
-4
No files found.
public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx
View file @
94f87c72
...
...
@@ -182,9 +182,9 @@ export const DefaultFieldConfigEditor: React.FC<Props> = ({ data, onChange, conf
return
(
<>
{
Object
.
keys
(
groupedConfigs
).
map
(
k
=>
{
{
Object
.
keys
(
groupedConfigs
).
map
(
(
k
,
i
)
=>
{
return
(
<
OptionsGroup
title=
{
k
}
>
<
OptionsGroup
title=
{
k
}
key=
{
`${k}/${i}`
}
>
<>
{
groupedConfigs
[
k
].
map
(
c
=>
{
return
renderEditor
(
c
);
...
...
public/app/features/dashboard/components/PanelEditor/PanelOptionsEditor.tsx
View file @
94f87c72
...
...
@@ -25,9 +25,9 @@ export const PanelOptionsEditor: React.FC<PanelOptionsEditorProps<any>> = ({ plu
return
(
<>
{
Object
.
keys
(
optionEditors
).
map
(
c
=>
{
{
Object
.
keys
(
optionEditors
).
map
(
(
c
,
i
)
=>
{
const
optionsToShow
=
optionEditors
[
c
]
.
map
((
e
,
i
)
=>
{
.
map
((
e
,
j
)
=>
{
if
(
e
.
showIf
&&
!
e
.
showIf
(
options
))
{
return
null
;
}
...
...
@@ -38,7 +38,7 @@ export const PanelOptionsEditor: React.FC<PanelOptionsEditorProps<any>> = ({ plu
</
Forms
.
Label
>
);
return
(
<
Forms
.
Field
label=
{
label
}
key=
{
`${e.id}/
i
`
}
>
<
Forms
.
Field
label=
{
label
}
key=
{
`${e.id}/
${j}
`
}
>
<
e
.
editor
value=
{
lodashGet
(
options
,
e
.
path
)
}
onChange=
{
value
=>
onOptionChange
(
e
.
path
,
value
)
}
...
...
@@ -50,7 +50,7 @@ export const PanelOptionsEditor: React.FC<PanelOptionsEditorProps<any>> = ({ plu
.
filter
(
e
=>
e
!==
null
);
return
optionsToShow
.
length
>
0
?
(
<
OptionsGroup
title=
{
c
}
defaultToClosed
>
<
OptionsGroup
title=
{
c
}
defaultToClosed
key=
{
`${c}/${i}`
}
>
<
div
>
{
optionsToShow
}
</
div
>
</
OptionsGroup
>
)
:
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment