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
9802d867
Unverified
Commit
9802d867
authored
Jun 14, 2018
by
Patrick O'Carroll
Committed by
GitHub
Jun 14, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12189 from ryantxu/focus-panel-search
autoFocus the add-panel search filter, and add on enter
parents
0cc8ccda
09dbb524
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
+12
-1
public/app/features/dashboard/dashgrid/AddPanelPanel.tsx
+12
-1
No files found.
public/app/features/dashboard/dashgrid/AddPanelPanel.tsx
View file @
9802d867
...
...
@@ -154,6 +154,15 @@ export class AddPanelPanel extends React.Component<AddPanelPanelProps, AddPanelP
});
}
filterKeyPress
(
evt
)
{
if
(
evt
.
key
===
'Enter'
)
{
let
panel
=
_
.
head
(
this
.
state
.
panelPlugins
);
if
(
panel
)
{
this
.
onAddPanel
(
panel
);
}
}
}
filterPanels
(
panels
,
filter
)
{
let
regex
=
new
RegExp
(
filter
,
'i'
);
return
panels
.
filter
(
panel
=>
{
...
...
@@ -229,10 +238,12 @@ export class AddPanelPanel extends React.Component<AddPanelPanelProps, AddPanelP
<
label
className=
"gf-form gf-form--grow gf-form--has-input-icon"
>
<
input
type=
"text"
className=
"gf-form-input max-width-20"
autoFocus
className=
"gf-form-input gf-form--grow"
placeholder=
"Panel Search Filter"
value=
{
this
.
state
.
filter
}
onChange=
{
this
.
filterChange
.
bind
(
this
)
}
onKeyPress=
{
this
.
filterKeyPress
.
bind
(
this
)
}
/>
<
i
className=
"gf-form-input-icon fa fa-search"
/>
</
label
>
...
...
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