Skip to content

Commit 25c307c

Browse files
committed
Removed disable check from click event
Signed-off-by: Moiz Masud <[email protected]>
1 parent b339279 commit 25c307c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/tiles/clickable-tile.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { Router } from "@angular/router";
2929
'bx--tile--disabled bx--link--disabled' : disabled
3030
}"
3131
tabindex="0"
32-
(click)="disabled ? null : navigate($event)"
32+
(click)="navigate($event)"
3333
[attr.href]="disabled ? null : href"
3434
[attr.target]="target"
3535
[attr.aria-disabled]="disabled">
@@ -74,7 +74,7 @@ export class ClickableTile {
7474
constructor(@Optional() protected router: Router) {}
7575

7676
navigate(event) {
77-
if (this.router && this.route) {
77+
if (this.router && this.route && !this.disabled) {
7878
event.preventDefault();
7979
const status = this.router.navigate(this.route, this.routeExtras);
8080
this.navigation.emit(status);

src/tiles/selection-tile.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { I18n } from "carbon-components-angular/i18n";
3232
[type]="(multiple ? 'checkbox': 'radio')"
3333
[value]="value"
3434
[name]="name"
35-
(change)="disabled ? null : onChange($event)"/>
35+
(change)="onChange($event)"/>
3636
<div class="bx--tile__checkmark">
3737
<svg width="16" height="16" viewBox="0 0 16 16">
3838
<path d="M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm3.646-10.854L6.75 10.043 4.354 7.646l-.708.708 3.104 3.103 5.604-5.603-.708-.708z"

0 commit comments

Comments
 (0)