mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DashboardSave: Autofocus save dashboard form input (#22748)
This commit is contained in:
parent
b51e28bc15
commit
b441b73345
@ -75,7 +75,12 @@ export const SaveDashboardAsForm: React.FC<SaveDashboardFormProps & { isNew?: bo
|
|||||||
{({ register, control, errors }) => (
|
{({ register, control, errors }) => (
|
||||||
<>
|
<>
|
||||||
<Forms.Field label="Dashboard name" invalid={!!errors.title} error="Dashboard name is required">
|
<Forms.Field label="Dashboard name" invalid={!!errors.title} error="Dashboard name is required">
|
||||||
<Forms.Input name="title" ref={register({ required: true })} aria-label="Save dashboard title field" />
|
<Forms.Input
|
||||||
|
name="title"
|
||||||
|
ref={register({ required: true })}
|
||||||
|
aria-label="Save dashboard title field"
|
||||||
|
autoFocus
|
||||||
|
/>
|
||||||
</Forms.Field>
|
</Forms.Field>
|
||||||
<Forms.Field label="Folder">
|
<Forms.Field label="Folder">
|
||||||
<Forms.InputControl
|
<Forms.InputControl
|
||||||
|
@ -31,7 +31,12 @@ export const SaveDashboardForm: React.FC<SaveDashboardFormProps> = ({ dashboard,
|
|||||||
{({ register, errors }) => (
|
{({ register, errors }) => (
|
||||||
<>
|
<>
|
||||||
<Forms.Field label="Changes description">
|
<Forms.Field label="Changes description">
|
||||||
<Forms.TextArea name="message" ref={register} placeholder="Add a note to describe your changes..." />
|
<Forms.TextArea
|
||||||
|
name="message"
|
||||||
|
ref={register}
|
||||||
|
placeholder="Add a note to describe your changes..."
|
||||||
|
autoFocus
|
||||||
|
/>
|
||||||
</Forms.Field>
|
</Forms.Field>
|
||||||
{hasTimeChanged && (
|
{hasTimeChanged && (
|
||||||
<Forms.Field label="Save current time range" description="Dashboard time range has changed">
|
<Forms.Field label="Save current time range" description="Dashboard time range has changed">
|
||||||
|
Loading…
Reference in New Issue
Block a user