Skip to content

Navigation Menu

Sign in
Appearance settings

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 29a5819

Browse filesBrowse files
committed
fix(toaster): use placement getter for backward compatibility
1 parent 5272d38 commit 29a5819
Copy full SHA for 29a5819

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed

‎projects/coreui-angular/src/lib/toast/toaster/toaster.component.ts

Copy file name to clipboardExpand all lines: projects/coreui-angular/src/lib/toast/toaster/toaster.component.ts
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ export class ToasterComponent implements OnInit {
6969
* Toaster placement
7070
* @return TToasterPlacement
7171
*/
72-
readonly placement = input<TToasterPlacement>(ToasterPlacement.TopEnd);
72+
readonly placementInput = input<TToasterPlacement>(ToasterPlacement.TopEnd, { alias: 'placement' });
73+
74+
get placement() {
75+
return this.placementInput();
76+
}
7377

7478
/**
7579
* Toaster position
@@ -81,7 +85,7 @@ export class ToasterComponent implements OnInit {
8185
readonly contentToasts = contentChildren(ToastComponent, { read: ViewContainerRef });
8286

8387
readonly hostClasses = computed(() => {
84-
const placement = this.placement();
88+
const placement = this.placement;
8589
const position = this.position();
8690
return {
8791
toaster: true,
@@ -119,7 +123,7 @@ export class ToasterComponent implements OnInit {
119123
for (const [key, value] of Object.entries(props)) {
120124
componentRef.setInput(key, value);
121125
}
122-
componentRef.setInput('placement', this.placement());
126+
componentRef.setInput('placement', this.placement);
123127
componentRef.setInput('dynamic', true);
124128
componentRef.setInput('index', index);
125129
componentRef.setInput('visible', true);

0 commit comments

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