remove remaining usage of action helper (#723)

This commit is contained in:
Jeldrik Hanschke 2023-11-04 15:40:02 +01:00 committed by GitHub
parent 76586f165d
commit 386910bdd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 5 deletions

View file

@ -3,7 +3,6 @@
module.exports = {
extends: 'recommended',
rules: {
'no-action': false,
'no-implicit-this': {
allow: ['scroll-first-invalid-element-into-view-port'],
},

View file

@ -70,4 +70,9 @@ export default class PollParticipationController extends Controller {
queryParams: { encryptionKey },
});
}
@action
resetSavingStatus() {
this.savingFailed = false;
}
}

View file

@ -38,7 +38,7 @@
<NextButton />
</div>
<div class="col-6 col-md-4 order-1 text-right">
<BackButton @onClick={{action "previousPage"}} />
<BackButton @onClick={{this.previousPage}} />
</div>
</div>
</BsForm>

View file

@ -18,7 +18,7 @@
<select
id={{el.id}}
class="custom-select"
{{on "change" (action el.setValue value="target.value")}}
{{on "change" (pick "target.value" el.setValue)}}
{{autofocus}}
>
{{#each this.answerTypes as |answerType|}}
@ -75,7 +75,7 @@
/>
</div>
<div class="col-6 col-md-4 order-1 text-right">
<BackButton @onClick={{action "previousPage"}} />
<BackButton @onClick={{this.previousPage}} />
</div>
</div>
</BsForm>

View file

@ -131,7 +131,7 @@
</div>
<BsModal
@onHidden={{action (mut this.savingFailed) false}}
@onHidden={{this.resetSavingStatus}}
@onSubmit={{this.save}}
@open={{this.savingFailed}}
data-test-modal="saving-failed"