Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 81cad31

Browse filesBrowse files
committed
refactor(chartjs): id getter for backward compatibility
1 parent 9ad6502 commit 81cad31
Copy full SHA for 81cad31

File tree

2 files changed

+6
-2
lines changed
Filter options

2 files changed

+6
-2
lines changed

‎projects/coreui-angular-chartjs/src/lib/chartjs.component.html

Copy file name to clipboardExpand all lines: projects/coreui-angular-chartjs/src/lib/chartjs.component.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#canvasElement
33
(click)="handleClick($event)"
44
[height]="height() || null"
5-
[id]="id()"
5+
[id]="id"
66
[width]="width() || null"
77
role="img"
88
style="display: none;"

‎projects/coreui-angular-chartjs/src/lib/chartjs.component.ts

Copy file name to clipboardExpand all lines: projects/coreui-angular-chartjs/src/lib/chartjs.component.ts
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ export class ChartjsComponent implements OnDestroy, OnChanges {
7979
* ID attribute applied to the rendered canvas.
8080
* @return string
8181
*/
82-
readonly id = input<string>(`c-chartjs-${nextId++}`);
82+
readonly idInput = input<string>(`c-chartjs-${nextId++}`, { alias: 'id' });
83+
84+
get id() {
85+
return this.idInput();
86+
}
8387

8488
/**
8589
* The options object that is passed into the Chart.js chart.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.