-
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 require 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 and openChange output 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 combination of open and openChange also makes them eligible for double binding:
<ibm-overflow-menu [(open)]="menuOpenState">
<!-- 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>The combination of isOpen and isOpenChange also makes them eligible for double binding:
<button ibmTooltip="Hello, world!" [(isOpen)]="tooltipState">I'm a double bound tooltip!</button>-
CheckboxChangeand thechangeoutput - usecheckedChangeinstead -
sizeinput onibm-checkbox -
nestedinput onibm-checkbox -
aria-labelandaria-labelledbyas input - useariaLabelandariaLabelledbyinstead
-
ToggleChangeandchangeoutput - usecheckedChangeinstead
-
sizeinput
- Instance method
closeAll- use the staticDialogService.closeAllinstead
-
sizeinput inibm-dropdown/ibm-dropdown-list/AbstractDropdownView -
valueinput inibm-dropdown- useitemValueKeyinstead
-
modalLabelinibm-modal- useariaLabelinstead
-
setContextmethod replacescreateas the method to initialize the service for a given dialog type
- Made
appendInlinemore intelligent - It will try to append inline more frequently, it will only append to theibm-placeholder/body if it's contained (at some point between it and the body element) within a scrolling container or it is explicitly set tofalse.
-
labelinput - useariaLabelinstead
-
flatpickrOptionsRangeinput - useflatpickrOptionsand setrangeto true instead
- Removed the entire
ibm-dialog-placeholdercomponent - useibm-placeholderinstead - Made
ElementServicemanditory forDialogsubclasses -
appendToBodyinput - useappendInlineinstead - Simplified the
closemethod inDialogServiceto just takeclose(dialogRef: ComponentRef<Dialog>)
-
appendToBodyinput - useappendInlineinstead
-
experimentalEnabledandisExperimental
-
modalType,modalLabel,modalTitle, andmodalContentas valid properties inAlertModalData - Removed the entire
ibm-modal-placeholdercomponent - use `ibm-placeholder instead -
AnimationsModuleand@angular/animationsas a dependency - The modal
@Modaldecorator
-
Numberas a valid export forNumberComponent
-
SearchChangeandchangeas a valid output event type - usevalueChangeinstead
-
selectedoutput - usevalueChangeinstead
-
ibmDataGridFocusdirective -
enableRowSelectinput onibm-table
-
ibm-sidenav-headercomponent