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 = { module.exports = {
extends: 'recommended', extends: 'recommended',
rules: { rules: {
'no-action': false,
'no-implicit-this': { 'no-implicit-this': {
allow: ['scroll-first-invalid-element-into-view-port'], allow: ['scroll-first-invalid-element-into-view-port'],
}, },

View file

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

View file

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

View file

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

View file

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