Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

New and Changed Lightning Web Components

Build UI easily with these new and changed components.

Changed Lightning Web Components

The following components have changed.

lightning-badge
The following attributes are now supported.
  • icon-alternative-text—The alternative text used to describe the icon, which is displayed as tooltip text.
  • icon-name—The Lightning Design System name of the icon to display inside the badge. Specify the name in the format utility:down where utility is the category, and down is the specific icon to be displayed.
  • icon-position—The position for the icon inside the badge. Specify the value start to display the icon before the text or end to display it after the text. The default is start.
lightning-breadcrumb
The following methods are now supported.
  • blur()—Removes focus on the link.
  • focus()—Sets focus on the link.
lightning-datatable
For columns with text data type, the behavior of Clip text and Wrap text actions have changed. Clip text now shows only the truncated text of the first line. Previously, when content contained newline characters, the table displayed truncated text for each new line. The Wrap text action no longer preserves extra whitespace in the content, and breaks lines and hyphenates words as needed to fit the column.
The following attribute is new.
  • column-widths-mode—Specifies how column widths are calculated. Set to fixed for columns with equal widths. Set to auto for column widths based on the width of the column content and the table width. The default is fixed.
The following property for the columns attribute is new.
  • hideDefaultActions—Specifies whether the default header actions are available on a column. The default is false.
lightning-input
The input type color has changed.
  • The commit event is supported.
The input type number has changed.
  • Shortcuts k, K, m, and M are allowed. For example, in the en-US locale, when you enter 1k the field displays 1,000. Entering 1m results in 1,000,000. When the input field is focused, it displays the multiplied number. For example, entering 1k results in 1,000 on blur, and 1000 when the input is focused again. You can’t use these shortcuts when programmatically assigning input values to the value attribute.
The input types date and datetime have changed.
  • On the current month view of the date picker, you can now select a date from the previous and next month. Previously, dates from the previous and next month were disabled on the current month view unless you navigated directly to those months.
  • The names for months and weekdays in the date picker now use your Salesforce language setting. Previously, these names used your locale setting.
lightning-input-field
Lookup fields are now supported in the Salesforce mobile app. When using the mobile app, users can do a lookup search for a supported object. The mobile lookup doesn't support creating a new record from the lookup field's dropdown menu.
Name fields now support the Middle Name and Suffix fields on contact, lead, and user records. To display the complete name compound field, specify field-name="Name". Alternatively, display the fields individually by using a separate lightning-input-field component for each field. Pass in FirstName, MiddleName, or LastName to the field-name attribute for each component.
Note

Note

To enable the Middle Name and Suffix fields, from Setup enter User Interface in the Quick Find box, then select User Interface. In Lightning Experience, the User Interface page is the last item under the User Interface node. On the User Interface page, select Enable Middle Names for Person Names and Enable Name Suffixes for Person Names.

The field data types date and datetime have changed.
  • On the current month view of the date picker, you can now select a date from the previous and next month. Previously, dates from the previous and next month were disabled on the current month view unless you navigated directly to those months.
  • The names for months and weekdays in the date picker now use your Salesforce language setting. Previously, these names used your locale setting.
The name field type has changed.
  • The suffix constituent field is now supported. To enable this field, from Setup enter User Interface in the Quick Find box, then select User Interface. In Lightning Experience, the User Interface page is the last item under the User Interface node. On the User Interface page, select Enable Name Suffixes for Person Names.
lightning-tabset
The following method is new.
  • focus—Apply focus on the tab that’s currently selected.
lightning-tree-grid
The following types are now supported for the first data column in the table.
  • button—Displays a button using lightning-button.
  • button-icon—Displays a button icon using lightning-button-icon.