Skip to content

Commit 38abdab

Browse files
committed
Merge branch 'appendto' of github.com:cal-smith/carbon-components-angular into appendto
2 parents 21214b7 + c04e51e commit 38abdab

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/dialog/dialog.directive.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ export class DialogDirective implements OnInit, OnDestroy, OnChanges {
6767
* Value `true` sets Dialog be appened to the body (to break out of containers)
6868
*/
6969
@Input() set appendToBody(v: boolean) {
70-
console.log("appendToBody has been deprecated. dialogs now append to the body by default.");
71-
console.log("ensure you have an ibm-placeholder in your app.");
72-
console.log("use appendInline if you need to position your dialogs within the normal page flow");
70+
console.log("`appendToBody` has been deprecated. Dialogs now append to the body by default.");
71+
console.log("Ensure you have an `ibm-placeholder` in your app.");
72+
console.log("Use `appendInline` if you need to position your dialogs within the normal page flow.");
7373
this.appendInline = !v;
7474
}
7575
get appendToBody() {

src/dialog/dialog.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class DialogService {
106106
if (dialogConfig.appendInline) {
107107
// add our component to the view
108108
this.dialogRef = viewContainer.createComponent(this.componentFactory, 0, this.injector);
109-
} else if (this.placeholderService.hasPlaceholderRef()) {
109+
} else if (!this.placeholderService.hasPlaceholderRef()) {
110110
this.dialogRef = viewContainer.createComponent(this.componentFactory, 0, this.injector);
111111
setTimeout(() => {
112112
window.document.querySelector("body").appendChild(this.dialogRef.location.nativeElement);

src/dropdown/dropdown.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ export class Dropdown implements OnInit, AfterContentInit, OnDestroy {
101101
* Set to `true` if the `Dropdown` is to be appended to the DOM body.
102102
*/
103103
@Input() set appendToBody (v) {
104-
console.log("appendToBody has been deprecated. dropdowns now append to the body by default.");
105-
console.log("ensure you have an ibm-placeholder in your app.");
106-
console.log("use appendInline if you need to position your dropdowns within the normal page flow");
104+
console.log("`appendToBody` has been deprecated. Dropdowns now append to the body by default.");
105+
console.log("Ensure you have an `ibm-placeholder` in your app.");
106+
console.log("Use `appendInline` if you need to position your dropdowns within the normal page flow.");
107107
this.appendInline = !v;
108108
}
109109

src/modal/modal.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import { cycleTabs } from "./../common/tab.service";
4444
* <ibm-modal-header (closeSelect)="closeModal()">Header text</ibm-modal-header>
4545
* <section class="modal-body">
4646
* <h1>Sample modal works.</h1>
47-
* <button class="btn--icon-link" nPopover="Hello there" title="Popover title" placement="right">
47+
* <button class="btn--icon-link" nPopover="Hello there" title="Popover title" placement="right" appendInline="true">
4848
* <ibm-icon icon="info" size="sm"></ibm-icon>
4949
* </button>
5050
* {{modalText}}

0 commit comments

Comments
 (0)