Skip to content

Commit

Permalink
Automatically focus the input field
Browse files Browse the repository at this point in the history
  • Loading branch information
HDinger committed Nov 28, 2024
1 parent 3724f0c commit 520f8e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
resource: 'work_packages',
searchKey: 'subjectOrId',
openDirectly: false,
focusDirectly: false,
focusDirectly: true,
dropdownPosition: 'bottom',
appendTo: "##{DIALOG_ID}",
data: { test_selector: ID_FIELD_TEST_SELECTOR }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
url:,
relations: true, # Activates relations fetch mode in the autocomplete
openDirectly: false,
focusDirectly: false,
focusDirectly: true,
dropdownPosition: 'bottom',
appendTo: "##{DIALOG_ID}",
data: { test_selector: TO_ID_FIELD_TEST_SELECTOR}
Expand All @@ -56,6 +56,7 @@
my_form.text_field(
name: :description,
label: Relation.human_attribute_name(:description),
autofocus: relation.persisted?
)
end
end
Expand Down

0 comments on commit 520f8e7

Please sign in to comment.