File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
admin/app/components/solidus_admin/option_types/edit/option_values_table/row Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,12 @@ export default class extends Controller {
10
10
remove ( ) {
11
11
this . element . remove ( ) ;
12
12
}
13
+
14
+ applyOnEnter ( event ) {
15
+ const submitter = event . target . form . elements . apply
16
+ if ( submitter ) {
17
+ event . preventDefault ( ) ;
18
+ event . target . form . requestSubmit ( submitter ) ;
19
+ }
20
+ }
13
21
}
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ def columns
45
45
"aria-label" : true ,
46
46
form : @form_id ,
47
47
"data-#{ stimulus_id } -target" : "focusable" ,
48
+ "data-action" : "keydown.enter->#{ stimulus_id } #applyOnEnter" ,
48
49
)
49
50
end
50
51
} ,
@@ -57,6 +58,7 @@ def columns
57
58
class : "required" ,
58
59
"aria-label" : true ,
59
60
form : @form_id ,
61
+ "data-action" : "keydown.enter->#{ stimulus_id } #applyOnEnter" ,
60
62
)
61
63
end
62
64
}
You can’t perform that action at this time.
0 commit comments