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
3ccc10f8
Commit
3ccc10f8
authored
Aug 13, 2019
by
Ryan McKinley
Committed by
Torkel Ödegaard
Aug 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
React: Rename deprecated UNSAFE_componentWillReceiveProps (#18526)
parent
4b344032
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
6 deletions
+6
-6
packages/grafana-ui/src/components/Tooltip/PopperController.tsx
+1
-1
public/app/core/components/Select/MetricSelect.tsx
+1
-1
public/app/features/explore/ElapsedTime.tsx
+1
-1
public/app/features/explore/QueryField.tsx
+1
-1
public/app/plugins/datasource/stackdriver/components/Aggregations.tsx
+1
-1
public/app/plugins/datasource/stackdriver/components/AliasBy.tsx
+1
-1
No files found.
packages/grafana-ui/src/components/Tooltip/PopperController.tsx
View file @
3ccc10f8
...
@@ -51,7 +51,7 @@ class PopperController extends React.Component<Props, State> {
...
@@ -51,7 +51,7 @@ class PopperController extends React.Component<Props, State> {
};
};
}
}
componentWillReceiveProps
(
nextProps
:
Props
)
{
UNSAFE_
componentWillReceiveProps
(
nextProps
:
Props
)
{
if
(
nextProps
.
placement
&&
nextProps
.
placement
!==
this
.
state
.
placement
)
{
if
(
nextProps
.
placement
&&
nextProps
.
placement
!==
this
.
state
.
placement
)
{
this
.
setState
((
prevState
:
State
)
=>
{
this
.
setState
((
prevState
:
State
)
=>
{
return
{
return
{
...
...
public/app/core/components/Select/MetricSelect.tsx
View file @
3ccc10f8
...
@@ -35,7 +35,7 @@ export class MetricSelect extends React.Component<Props, State> {
...
@@ -35,7 +35,7 @@ export class MetricSelect extends React.Component<Props, State> {
this
.
setState
({
options
:
this
.
buildOptions
(
this
.
props
)
});
this
.
setState
({
options
:
this
.
buildOptions
(
this
.
props
)
});
}
}
componentWillReceiveProps
(
nextProps
:
Props
)
{
UNSAFE_
componentWillReceiveProps
(
nextProps
:
Props
)
{
if
(
nextProps
.
options
.
length
>
0
||
nextProps
.
variables
.
length
)
{
if
(
nextProps
.
options
.
length
>
0
||
nextProps
.
variables
.
length
)
{
this
.
setState
({
options
:
this
.
buildOptions
(
nextProps
)
});
this
.
setState
({
options
:
this
.
buildOptions
(
nextProps
)
});
}
}
...
...
public/app/features/explore/ElapsedTime.tsx
View file @
3ccc10f8
...
@@ -33,7 +33,7 @@ export default class ElapsedTime extends PureComponent<Props, State> {
...
@@ -33,7 +33,7 @@ export default class ElapsedTime extends PureComponent<Props, State> {
this
.
setState
({
elapsed
});
this
.
setState
({
elapsed
});
};
};
componentWillReceiveProps
(
nextProps
:
Props
)
{
UNSAFE_
componentWillReceiveProps
(
nextProps
:
Props
)
{
if
(
nextProps
.
time
)
{
if
(
nextProps
.
time
)
{
clearInterval
(
this
.
timer
);
clearInterval
(
this
.
timer
);
}
else
if
(
this
.
props
.
time
)
{
}
else
if
(
this
.
props
.
time
)
{
...
...
public/app/features/explore/QueryField.tsx
View file @
3ccc10f8
...
@@ -125,7 +125,7 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS
...
@@ -125,7 +125,7 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS
}
}
}
}
componentWillReceiveProps
(
nextProps
:
QueryFieldProps
)
{
UNSAFE_
componentWillReceiveProps
(
nextProps
:
QueryFieldProps
)
{
if
(
nextProps
.
syntaxLoaded
&&
!
this
.
props
.
syntaxLoaded
)
{
if
(
nextProps
.
syntaxLoaded
&&
!
this
.
props
.
syntaxLoaded
)
{
// Need a bogus edit to re-render the editor after syntax has fully loaded
// Need a bogus edit to re-render the editor after syntax has fully loaded
const
change
=
this
.
state
.
value
const
change
=
this
.
state
.
value
...
...
public/app/plugins/datasource/stackdriver/components/Aggregations.tsx
View file @
3ccc10f8
...
@@ -33,7 +33,7 @@ export class Aggregations extends React.Component<Props, State> {
...
@@ -33,7 +33,7 @@ export class Aggregations extends React.Component<Props, State> {
this
.
setAggOptions
(
this
.
props
);
this
.
setAggOptions
(
this
.
props
);
}
}
componentWillReceiveProps
(
nextProps
:
Props
)
{
UNSAFE_
componentWillReceiveProps
(
nextProps
:
Props
)
{
this
.
setAggOptions
(
nextProps
);
this
.
setAggOptions
(
nextProps
);
}
}
...
...
public/app/plugins/datasource/stackdriver/components/AliasBy.tsx
View file @
3ccc10f8
...
@@ -24,7 +24,7 @@ export class AliasBy extends Component<Props, State> {
...
@@ -24,7 +24,7 @@ export class AliasBy extends Component<Props, State> {
this
.
setState
({
value
:
this
.
props
.
value
});
this
.
setState
({
value
:
this
.
props
.
value
});
}
}
componentWillReceiveProps
(
nextProps
:
Props
)
{
UNSAFE_
componentWillReceiveProps
(
nextProps
:
Props
)
{
if
(
nextProps
.
value
!==
this
.
props
.
value
)
{
if
(
nextProps
.
value
!==
this
.
props
.
value
)
{
this
.
setState
({
value
:
nextProps
.
value
});
this
.
setState
({
value
:
nextProps
.
value
});
}
}
...
...
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