Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Fixed infinite loop in cards #12

Merged
merged 3 commits into from
Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
},
"dependencies": {},
"devDependencies": {
"@blackbaud/skyux": "2.30.0",
"@blackbaud/skyux-builder": "1.29.0",
"@blackbaud/skyux": "2.37.0",
"@blackbaud/skyux-builder": "1.30.0",
"@skyux-sdk/builder-plugin-skyux": "1.0.0-rc.5"
}
}
2 changes: 1 addition & 1 deletion src/app/public/modules/card/card.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1 class="sky-card-title sky-section-heading" *ngIf="showTitle">
<sky-checkbox
(click)="$event.stopPropagation()"
[ngModel]="selected"
(ngModelChange)="contentClick()"
(ngModelChange)="onCheckboxChange($event)"
Blackbaud-TrevorBurch marked this conversation as resolved.
Show resolved Hide resolved
[label]="'skyux_card_checkbox_label' | skyLibResources"
></sky-checkbox>
</div>
Expand Down
7 changes: 7 additions & 0 deletions src/app/public/modules/card/card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ export class SkyCardComponent implements AfterContentInit, OnDestroy {
}
}

public onCheckboxChange(newValue: boolean) {
if (this.selectable && this.selected !== newValue) {
Blackbaud-TrevorBurch marked this conversation as resolved.
Show resolved Hide resolved
this.selected = newValue;
this.selectedChange.emit(this.selected);
}
}

public ngOnDestroy() {
/* istanbul ignore else */
/* sanity check */
Expand Down