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
0870ccea
Unverified
Commit
0870ccea
authored
Mar 25, 2020
by
Torkel Ödegaard
Committed by
GitHub
Mar 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NewPanelEdit: Fixed error with custom override properties (#23055)
parent
0ed78068
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
packages/grafana-data/src/field/fieldOverrides.ts
+2
-2
packages/grafana-ui/src/components/Forms/Select/Select.story.tsx
+27
-0
No files found.
packages/grafana-data/src/field/fieldOverrides.ts
View file @
0870ccea
...
...
@@ -204,8 +204,8 @@ function setDynamicConfigValue(config: FieldConfig, value: DynamicConfigValue, c
const
remove
=
val
===
undefined
||
val
===
null
;
if
(
remove
)
{
if
(
value
.
custom
)
{
delete
(
config
?.
custom
as
any
)
[
value
.
prop
];
if
(
value
.
custom
&&
config
.
custom
)
{
delete
config
.
custom
[
value
.
prop
];
}
else
{
delete
(
config
as
any
)[
value
.
prop
];
}
...
...
packages/grafana-ui/src/components/Forms/Select/Select.story.tsx
View file @
0870ccea
...
...
@@ -108,6 +108,33 @@ export const basicSelectPlainValue = () => {
/**
* Uses plain values instead of SelectableValue<T>
*/
export
const
SelectWithOptionDescriptions
=
()
=>
{
// TODO this is not working with new Select
const
[
value
,
setValue
]
=
useState
<
number
>
();
const
options
=
[
{
label
:
'hello'
,
value
:
1
,
description
:
'this is a description'
},
{
label
:
'hello 2'
,
value
:
2
,
description
:
'second description'
},
];
return
(
<>
<
Select
options=
{
options
}
value=
{
value
}
onChange=
{
v
=>
{
setValue
(
v
.
value
);
}
}
size=
"md"
{
...
getDynamicProps
()}
/>
</>
);
};
/**
* Uses plain values instead of SelectableValue<T>
*/
export
const
multiPlainValue
=
()
=>
{
const
[
value
,
setValue
]
=
useState
<
string
[]
>
();
...
...
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