Skip to content

Commit

Permalink
fix(angular/modal): avoid overflow of modal content (#1281)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Leroux <[email protected]>
  • Loading branch information
matthiashader and danielleroux authored May 17, 2024
1 parent 544ceed commit a8a2d55
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-roses-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siemens/ix-angular': patch
---

fix(angular/modal): avoid overflow of modal content
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { ModalService } from '@siemens/ix-angular';
<ix-button (click)="openModal()">Show modal</ix-button>
<ng-template #customModal let-modal>
<div>
<ix-modal>
<ix-modal-header> Message headline </ix-modal-header>
<ix-modal-content
>Message text lorem ipsum: {{ modal.data }}</ix-modal-content
Expand All @@ -33,7 +33,7 @@ import { ModalService } from '@siemens/ix-angular';
OK
</ix-button>
</ix-modal-footer>
</div>
</ix-modal>
</ng-template>
`,
})
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/src/modal/modal.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test('should create modal by component typ', async () => {
},
injector: {
get: jest.fn(() => ({
nativeElement: {}
nativeElement: { style: {} }
})),
},
})),
Expand Down
1 change: 1 addition & 0 deletions packages/angular/src/modal/modal.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export class ModalService {
this.appRef.attachView(instance.hostView);

const element = instance.injector.get(ElementRef);
element.nativeElement.style.display = 'contents';

const modalInstance = await this.createModalInstance<TData, TReason>(
context,
Expand Down

0 comments on commit a8a2d55

Please sign in to comment.