-
Notifications
You must be signed in to change notification settings - Fork 308
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>
-
CheckboxChange
and thechange
output - usecheckedChange
instead -
size
input onibm-checkbox
-
nested
input onibm-checkbox
-
aria-label
andaria-labelledby
as input - useariaLabel
andariaLabelledby
instead
-
ToggleChange
andchange
output - usecheckedChange
instead
-
size
input
- Instance method
closeAll
- use the staticDialogService.closeAll
instead
-
size
input inibm-dropdown
/ibm-dropdown-list
/AbstractDropdownView
-
value
input inibm-dropdown
- useitemValueKey
instead
-
modalLabel
inibm-modal
- useariaLabel
instead
-
setContext
method replacescreate
as the method to initialize the service for a given dialog type
- Made
appendInline
more 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
.
-
label
input - useariaLabel
instead
-
flatpickrOptionsRange
input - useflatpickrOptions
and setrange
to true instead
- Removed the entire
ibm-dialog-placeholder
component - useibm-placeholder
instead - Made
ElementService
manditory forDialog
subclasses -
appendToBody
input - useappendInline
instead - Simplified the
close
method inDialogService
to just takeclose(dialogRef: ComponentRef<Dialog>)
-
appendToBody
input - useappendInline
instead
-
experimentalEnabled
andisExperimental
-
modalType
,modalLabel
,modalTitle
, andmodalContent
as valid properties inAlertModalData
- Removed the entire
ibm-modal-placeholder
component - use `ibm-placeholder instead -
AnimationsModule
and@angular/animations
as a dependency - The modal
@Modal
decorator
-
Number
as a valid export forNumberComponent
-
SearchChange
andchange
as a valid output event type - usevalueChange
instead
-
selected
output - usevalueChange
instead
-
ibmDataGridFocus
directive -
enableRowSelect
input onibm-table
-
ibm-sidenav-header
component