Skip to content

Commit

Permalink
Merge pull request #197 from amandee27/fix/sum-row
Browse files Browse the repository at this point in the history
Fix #194: Update Sum row immediately when user making changes
  • Loading branch information
Morphclue authored Oct 29, 2024
2 parents f04432e + 2cc8c8d commit aea50e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ <h1 class="text-center">
[canParticipate]="!closedReason"
[token]="token"
[bestOption]="bestOption"
(changed)="onTableChange()"
></apollusia-table>
}
@case ("events") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,13 @@ export class ChooseEventsComponent implements OnInit {
private userVoted(): boolean {
return this.participants?.some(participant => participant.token === this.token) ?? false;
}

onTableChange() {
if(this.poll) {
this.pollService.getEvents(this.poll._id).subscribe((events)=>{
this.pollEvents = events;
this.updateHelpers();
})
}
}
}

0 comments on commit aea50e2

Please sign in to comment.