mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Search: Auto focus input elements (#61443)
This commit is contained in:
@@ -26,6 +26,8 @@ export function DashboardSearch({}: Props) {
|
||||
<div>
|
||||
<input
|
||||
type="text"
|
||||
// eslint-disable-next-line jsx-a11y/no-autofocus
|
||||
autoFocus
|
||||
placeholder={state.includePanels ? 'Search dashboards and panels by name' : 'Search dashboards by name'}
|
||||
value={state.query ?? ''}
|
||||
onChange={(e) => stateManager.onQueryChange(e.currentTarget.value)}
|
||||
|
||||
@@ -46,6 +46,7 @@ export const ManageDashboardsNew = React.memo(({ folder }: Props) => {
|
||||
value={state.query ?? ''}
|
||||
onChange={(e) => stateManager.onQueryChange(e.currentTarget.value)}
|
||||
onKeyDown={onKeyDown}
|
||||
// eslint-disable-next-line jsx-a11y/no-autofocus
|
||||
autoFocus
|
||||
spellCheck={false}
|
||||
placeholder={state.includePanels ? 'Search for dashboards and panels' : 'Search for dashboards'}
|
||||
|
||||
Reference in New Issue
Block a user