-
Notifications
You must be signed in to change notification settings - Fork 317
v3 to v4 upgrade guide
The ibm-modal now requires an open attribute. This attribute allows for better control over the visibility of the modal. If you're using a modal component that extends BaseModal all you need to do is add [open]="open" to the ibm-modal component in your template.
Old:
<ibm-modal>
<!-- snip -->
</modal>New:
<ibm-modal [open]="open">
<!-- snip -->
</ibm-modal>The ibm-modal component can now be used in a standard component template, and does not required the use of the ModalService or extending BaseModal. ModalService is still available and recommended as an easy way to encapsulate your modal code, or open our data driven modals such as the AlertModal.
Example:
<!-- component template -->
<ibm-modal [open]="showModal">
<!-- modal contents -->
</ibm-modal>
<!-- component template -->The ibm-overflow-menu component now supports an open input to allow for programmatic control over the open/closed state of the menu.
Example:
<ibm-overflow-menu [open]="menuOpen">
<!-- menu items here -->
</ibm-overflow-menu>The ibmDialog and descendant (ibmTooltip and ibmOverflowMenu) directives now support the isOpen input and isOpenChange output for programmatic control over the open/closed state of the dialog.
Example:
<button ibmTooltip="Hello, world!" [isOpen]="tooltipOpen">I'm a tooltip!</button>- thing
- thing
- thing