Skip to content

Commit

Permalink
chor: extend pollButtonSubmit with event
Browse files Browse the repository at this point in the history
  • Loading branch information
novacuum committed Mar 6, 2024
1 parent 49a1cc4 commit aed0f1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/forum/components/Poll/PollSubmitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class PollSubmitButton extends Component<PollSubmitButtonAttrs> {
<Button
className="Button Button--primary Poll-submit"
loading={state.loadingOptions}
onclick={() => this.pollButtonSubmit(state)}
onclick={(event:Event) => this.pollButtonSubmit(state, event)}
disabled={!state.hasSelectedOptions()}
>
{app.translator.trans('fof-polls.forum.poll.submit_button')}
Expand All @@ -27,7 +27,7 @@ export default class PollSubmitButton extends Component<PollSubmitButtonAttrs> {
* Event handler for submit button being clicked
*/

pollButtonSubmit(state: PollState): void {
pollButtonSubmit(state: PollState, event:Event): void {
state.onsubmit();
}
}

0 comments on commit aed0f1a

Please sign in to comment.