Add Stimulus autofocus controller

This commit is contained in:
Andreas Nedbal 2022-11-20 16:30:45 +01:00 committed by Andreas Nedbal
parent efef85b7c6
commit 9a4c0d576d
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
import { Controller } from '@hotwired/stimulus';
export default class extends Controller {
connect(): void {
(this.element as HTMLInputElement).focus();
}
}