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
9ba98b87
Commit
9ba98b87
authored
Feb 05, 2019
by
Hugo Häggmark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #15223 by handling onPaste event because of bug in Slate
parent
6eb69d37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
public/app/features/explore/QueryField.tsx
+9
-0
No files found.
public/app/features/explore/QueryField.tsx
View file @
9ba98b87
...
...
@@ -468,6 +468,14 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS
);
};
handlePaste
=
(
event
:
ClipboardEvent
,
change
:
Editor
)
=>
{
const
pastedValue
=
event
.
clipboardData
.
getData
(
'Text'
);
const
newValue
=
change
.
value
.
change
().
insertText
(
pastedValue
);
this
.
onChange
(
newValue
);
return
true
;
};
render
()
{
const
{
disabled
}
=
this
.
props
;
const
wrapperClassName
=
classnames
(
'slate-query-field__wrapper'
,
{
...
...
@@ -484,6 +492,7 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS
onKeyDown=
{
this
.
onKeyDown
}
onChange=
{
this
.
onChange
}
onFocus=
{
this
.
handleFocus
}
onPaste=
{
this
.
handlePaste
}
placeholder=
{
this
.
props
.
placeholder
}
plugins=
{
this
.
plugins
}
spellCheck=
{
false
}
...
...
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