mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-17 06:59:35 +00:00
Merge branch 'autofocus-fields'
This commit is contained in:
commit
f024c4b09e
4 changed files with 12 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ export default class extends Controller
|
|||
{
|
||||
connect() {
|
||||
this.element.addEventListener('show.bs.modal', event => this._handleModalOpen(event));
|
||||
this.element.addEventListener('shown.bs.modal', event => this._handleModalShown(event));
|
||||
}
|
||||
|
||||
_handleModalOpen(event) {
|
||||
|
|
@ -61,4 +62,8 @@ export default class extends Controller
|
|||
amountInput.setAttribute('max', lotAmount);
|
||||
}
|
||||
}
|
||||
|
||||
_handleModalShown(event) {
|
||||
this.element.querySelector('input[name="amount"]').focus();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue