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
6dd1a8e6
Unverified
Commit
6dd1a8e6
authored
Feb 05, 2019
by
Torkel Ödegaard
Committed by
GitHub
Feb 05, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15256 from grafana/hugoh/bug-explore-cut-and-paste
Handle onPaste because of bug in this Slate version
parents
310ee567
9ba98b87
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 @
6dd1a8e6
...
...
@@ -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