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
2e8dd196
Commit
2e8dd196
authored
Mar 06, 2019
by
ryan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use pure component
parent
627a32e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
public/app/plugins/panel/text2/TextPanel.tsx
+4
-4
No files found.
public/app/plugins/panel/text2/TextPanel.tsx
View file @
2e8dd196
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Pure
Component
}
from
'react'
;
import
Remarkable
from
'remarkable'
;
import
{
sanitize
}
from
'app/core/utils/text'
;
...
...
@@ -14,7 +14,7 @@ interface State {
html
:
string
;
}
export
class
TextPanel
extends
Component
<
Props
,
State
>
{
export
class
TextPanel
extends
Pure
Component
<
Props
,
State
>
{
remarkable
:
Remarkable
;
constructor
(
props
)
{
...
...
@@ -30,11 +30,11 @@ export class TextPanel extends Component<Props, State> {
if
(
html
!==
this
.
state
.
html
)
{
this
.
setState
({
html
});
}
},
1
0
0
);
},
1
5
0
);
componentDidUpdate
(
prevProps
:
Props
)
{
// Since any change could be referenced in a template variable,
// This needs to process everyt
hing
// This needs to process everyt
ime (with debounce)
this
.
updateHTML
();
}
...
...
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