Bug fix preventing undesired recreation of poll-collection and poll-votes on poll change.
This commit is contained in:
parent
866acfe7f5
commit
5ef1869a10
@ -1,4 +1,4 @@
|
|||||||
<mat-card class="os-card" *ngFor="let poll of polls">
|
<mat-card class="os-card" *ngFor="let poll of polls; trackBy: identifyPoll">
|
||||||
<p class="subtitle-text">
|
<p class="subtitle-text">
|
||||||
<a [routerLink]="getPollDetailLink(poll)" [state]="{ back: 'true' }">{{ getPollVoteTitle(poll) }}</a>
|
<a [routerLink]="getPollDetailLink(poll)" [state]="{ back: 'true' }">{{ getPollVoteTitle(poll) }}</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -53,6 +53,10 @@ export class PollCollectionComponent extends BaseViewComponentDirective implemen
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public identifyPoll(index: number, poll: ViewBasePoll): number {
|
||||||
|
return poll.id;
|
||||||
|
}
|
||||||
|
|
||||||
public getPollVoteTitle(poll: ViewBasePoll): string {
|
public getPollVoteTitle(poll: ViewBasePoll): string {
|
||||||
const contentObject = poll.getContentObject();
|
const contentObject = poll.getContentObject();
|
||||||
const listTitle = contentObject.getListTitle();
|
const listTitle = contentObject.getListTitle();
|
||||||
|
Loading…
Reference in New Issue
Block a user