lightning-base-components 1.26.4-alpha → 1.27.2-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -91
- package/{scopedImports/@salesforce-gate-accordionCloseSingleSection.bc.ltng.js → external/flagStub.js} +1 -1
- package/{scopedImports/@salesforce-gate-bc.256.enableInputSearchCommitEvent.js → external/gateStub.js} +1 -1
- package/package.json +89 -77
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.modalTitle.js +1 -1
- package/scopedImports/{@salesforce-gate-assertContext.bc.ltng.js → @salesforce-label-LightningPrimitiveColumnSorter.deleteButtonAltText.js} +1 -1
- package/src/lightning/accordion/__docs__/accordion.md +2 -2
- package/src/lightning/accordion/accordion-section.slds.css +100 -107
- package/src/lightning/accordion/accordion.lbc.native.css +0 -1
- package/src/lightning/accordion/accordion.lbc.synthetic.css +0 -1
- package/src/lightning/accordion/accordion.slds.css +12 -12
- package/src/lightning/accordionSection/__docs__/accordionSection.md +1 -0
- package/src/lightning/accordionSection/accordion-section.slds.css +100 -107
- package/src/lightning/accordionSection/accordionSection.lbc.native.css +0 -2
- package/src/lightning/accordionSection/accordionSection.lbc.synthetic.css +1 -2
- package/src/lightning/accordionSection/button.slds.css +32 -17
- package/src/lightning/alert/__docs__/alert.md +13 -13
- package/src/lightning/alert/alert.css +1 -1
- package/src/lightning/ariaObserver/__docs__/ariaObserver.md +16 -10
- package/src/lightning/avatar/__docs__/avatar.md +2 -2
- package/src/lightning/avatar/avatar.css +1 -1
- package/src/lightning/avatar/avatar.slds.css +96 -97
- package/src/lightning/badge/__docs__/badge.md +3 -3
- package/src/lightning/badge/badge.css +1 -1
- package/src/lightning/badge/badge.slds.css +71 -56
- package/src/lightning/barcodeScanner/__docs__/barcodeScanner.md +9 -9
- package/src/lightning/baseCombobox/base-combobox.slds.css +171 -170
- package/src/lightning/baseCombobox/baseCombobox.lbc.synthetic.css +0 -1
- package/src/lightning/baseCombobox/dropdown.slds.css +405 -388
- package/src/lightning/baseCombobox/input-text.slds.css +172 -190
- package/src/lightning/baseCombobox/listbox.slds.css +181 -175
- package/src/lightning/baseCombobox/spinner.slds.css +327 -326
- package/src/lightning/baseComboboxItem/listbox.slds.css +181 -175
- package/src/lightning/breadcrumb/__docs__/breadcrumb.md +2 -2
- package/src/lightning/breadcrumb/breadcrumb.slds.css +13 -14
- package/src/lightning/breadcrumbs/__docs__/breadcrumbs.md +1 -1
- package/src/lightning/breadcrumbs/breadcrumbs.css +1 -1
- package/src/lightning/breadcrumbs/breadcrumbs.lbc.native.css +1 -1
- package/src/lightning/breadcrumbs/breadcrumbs.slds.css +27 -28
- package/src/lightning/button/__docs__/button.md +16 -16
- package/src/lightning/button/__examples__/accesskey/accesskey.css +5 -3
- package/src/lightning/button/__examples__/inverse/inverse.css +2 -2
- package/src/lightning/button/button.slds.css +32 -17
- package/src/lightning/buttonGroup/__docs__/buttonGroup.md +5 -5
- package/src/lightning/buttonGroup/button-group.slds.css +1 -2
- package/src/lightning/buttonGroup/buttonGroup.lbc.native.css +1 -1
- package/src/lightning/buttonIcon/__docs__/buttonIcon.md +20 -20
- package/src/lightning/buttonIcon/button-icon.slds.css +50 -31
- package/src/lightning/buttonIconStateful/__docs__/buttonIconStateful.md +12 -12
- package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +33 -40
- package/src/lightning/buttonIconStateful/button-icon.slds.css +50 -31
- package/src/lightning/buttonIconStateful/button.slds.css +32 -17
- package/src/lightning/buttonIconStateful/buttonIconStateful.lbc.synthetic.css +5 -1
- package/src/lightning/buttonMenu/__docs__/buttonMenu.md +22 -22
- package/src/lightning/buttonMenu/button-icon.slds.css +50 -31
- package/src/lightning/buttonMenu/button-menu.slds.css +113 -115
- package/src/lightning/buttonMenu/button.slds.css +32 -17
- package/src/lightning/buttonMenu/buttonMenu.css +4 -1
- package/src/lightning/buttonMenu/buttonMenu.lbc.synthetic.css +1 -3
- package/src/lightning/buttonMenu/dropdown.slds.css +405 -388
- package/src/lightning/buttonStateful/__docs__/buttonStateful.md +9 -9
- package/src/lightning/buttonStateful/button-stateful.slds.css +98 -102
- package/src/lightning/buttonStateful/button.slds.css +32 -17
- package/src/lightning/calendar/calendar.slds.css +188 -191
- package/src/lightning/calendar/dropdown.slds.css +405 -388
- package/src/lightning/card/__docs__/card.md +1 -1
- package/src/lightning/card/__examples__/custom/custom.css +2 -2
- package/src/lightning/card/card.slds.css +137 -175
- package/src/lightning/carousel/button-menu.slds.css +113 -115
- package/src/lightning/carousel/button.slds.css +32 -17
- package/src/lightning/carousel/carousel.js +11 -18
- package/src/lightning/carousel/carousel.slds.css +15 -6
- package/src/lightning/carouselImage/carouselImage.lbc.native.css +0 -1
- package/src/lightning/checkboxGroup/__docs__/checkboxGroup.md +7 -7
- package/src/lightning/checkboxGroup/checkbox-group.slds.css +94 -60
- package/src/lightning/checkboxGroup/form-element.slds.css +4 -4
- package/src/lightning/colorPickerCustom/color-picker-custom.slds.css +212 -211
- package/src/lightning/colorPickerCustom/input-text.slds.css +172 -190
- package/src/lightning/colorPickerPanel/color-picker-panel.slds.css +22 -23
- package/src/lightning/colorPickerPanel/colorPickerPanel.lbc.synthetic.css +4 -2
- package/src/lightning/colorPickerPanel/popover.slds.css +127 -128
- package/src/lightning/combobox/__docs__/combobox.md +4 -5
- package/src/lightning/combobox/combobox.css +1 -2
- package/src/lightning/combobox/combobox.lbc.synthetic.css +17 -4
- package/src/lightning/combobox/combobox.slds.css +9 -10
- package/src/lightning/combobox/form-element.slds.css +4 -4
- package/src/lightning/confirm/__docs__/confirm.md +14 -14
- package/src/lightning/context/README.md +13 -13
- package/src/lightning/datatable/README.md +2 -3
- package/src/lightning/datatable/__docs__/datatable.md +82 -77
- package/src/lightning/datatable/__docs__/multi-column-sorting.md +4 -4
- package/src/lightning/datatable/__requirements__/column_widths_requirements.md +68 -68
- package/src/lightning/datatable/__requirements__/requirements.md +1 -1
- package/src/lightning/datatable/button-icon.slds.css +50 -31
- package/src/lightning/datatable/columns.js +2 -2
- package/src/lightning/datatable/datagrid.slds.css +341 -267
- package/src/lightning/datatable/datatable.js +6 -1
- package/src/lightning/datatable/icon.slds.css +6 -2
- package/src/lightning/datatable/input-checkbox.slds.css +130 -124
- package/src/lightning/datatable/primitive-cell-factory.slds.css +0 -1
- package/src/lightning/datatable/rows.js +1 -3
- package/src/lightning/datatable/templates/div/div.css +33 -15
- package/src/lightning/datatable/templates/table/table.css +2 -1
- package/src/lightning/datepicker/form-element.slds.css +4 -4
- package/src/lightning/datepicker/input-text.slds.css +172 -190
- package/src/lightning/datetimepicker/form-element.slds.css +4 -4
- package/src/lightning/datetimepicker/input-text.slds.css +172 -190
- package/src/lightning/dialog/README.md +7 -6
- package/src/lightning/dialog/__requirements__/requirements.md +18 -18
- package/src/lightning/dualListbox/__docs__/dualListbox.md +24 -24
- package/src/lightning/dualListbox/dual-listbox.slds.css +192 -192
- package/src/lightning/dualListbox/dualListbox.lbc.native.css +1 -1
- package/src/lightning/dualListbox/form-element.slds.css +4 -4
- package/src/lightning/dualListbox/listbox.slds.css +181 -175
- package/src/lightning/dynamicIcon/__docs__/dynamicIcon.md +6 -6
- package/src/lightning/dynamicIcon/dynamic-icon-ellie.slds.css +0 -2
- package/src/lightning/dynamicIcon/dynamic-icon-eq.slds.css +0 -2
- package/src/lightning/dynamicIcon/dynamic-icon-score.slds.css +3 -5
- package/src/lightning/dynamicIcon/dynamic-icon-strength.slds.css +109 -108
- package/src/lightning/dynamicIcon/dynamic-icon-trend.slds.css +97 -99
- package/src/lightning/dynamicIcon/dynamic-icon-waffle.slds.css +0 -2
- package/src/lightning/features/gates/imports.js +6 -1
- package/src/lightning/focusTrap/__requirements__/requirements.md +26 -26
- package/src/lightning/formattedAddress/__docs__/formattedAddress.md +0 -1
- package/src/lightning/formattedAddress/formattedAddress.css +1 -1
- package/src/lightning/formattedAddress/formattedAddress.lbc.native.css +1 -1
- package/src/lightning/formattedDateTime/__docs__/formattedDateTime.md +11 -11
- package/src/lightning/formattedEmail/__docs__/formattedEmail.md +2 -2
- package/src/lightning/formattedEmail/formattedEmail.lbc.native.css +1 -2
- package/src/lightning/formattedPhone/__docs__/formattedPhone.md +2 -2
- package/src/lightning/formattedRichText/__docs__/formattedRichText.md +14 -14
- package/src/lightning/formattedRichText/formattedRichText.lbc.native.css +1 -1
- package/src/lightning/formattedRichTextRenderer/formattedRichTextRenderer.lbc.native.css +1 -1
- package/src/lightning/formattedText/formattedText.lbc.native.css +1 -1
- package/src/lightning/formattedTime/__docs__/formattedTime.md +3 -3
- package/src/lightning/formattedUrl/__docs__/formattedUrl.md +11 -11
- package/src/lightning/groupedCombobox/README.md +33 -34
- package/src/lightning/groupedCombobox/form-element.slds.css +4 -4
- package/src/lightning/groupedCombobox/grouped-combobox.slds.css +10 -10
- package/src/lightning/groupedCombobox/groupedCombobox.lbc.native.css +0 -1
- package/src/lightning/groupedCombobox/input-text.slds.css +172 -190
- package/src/lightning/helptext/__docs__/helptext.md +5 -5
- package/src/lightning/helptext/button-icon.slds.css +50 -31
- package/src/lightning/helptext/form-element.slds.css +4 -4
- package/src/lightning/helptext/help-text.slds.css +3 -4
- package/src/lightning/helptext/helptext.css +1 -1
- package/src/lightning/icon/__docs__/icon.md +10 -10
- package/src/lightning/icon/__examples__/variants/variants.css +3 -3
- package/src/lightning/icon/icon.slds.css +6 -2
- package/src/lightning/input/__docs__/input.md +47 -49
- package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.css +6 -6
- package/src/lightning/input/__requirements__/requirements.md +49 -49
- package/src/lightning/input/form-element.slds.css +4 -4
- package/src/lightning/input/input.lbc.synthetic.css +1 -1
- package/src/lightning/inputAddress/__docs__/inputAddress.md +26 -27
- package/src/lightning/inputAddress/form-element.slds.css +4 -4
- package/src/lightning/inputAddress/input-address.slds.css +6 -6
- package/src/lightning/inputAddress/input-text.slds.css +172 -190
- package/src/lightning/inputLocation/form-element.slds.css +4 -4
- package/src/lightning/inputLocation/input-location.slds.css +6 -6
- package/src/lightning/inputLocation/input-text.slds.css +172 -190
- package/src/lightning/inputName/__docs__/inputName.md +7 -7
- package/src/lightning/inputName/form-element.slds.css +4 -4
- package/src/lightning/inputName/input-text.slds.css +172 -190
- package/src/lightning/inputUtils/validity.js +37 -18
- package/src/lightning/interactiveDialogBase/button.slds.css +32 -17
- package/src/lightning/interactiveDialogBase/interactive-dialog-base.slds.css +9 -18
- package/src/lightning/interactiveDialogBase/interactiveDialogBase.lbc.native.css +1 -1
- package/src/lightning/interactiveDialogBase/modal-base.slds.css +198 -194
- package/src/lightning/interactiveDialogBase/modal-body.slds.css +33 -34
- package/src/lightning/interactiveDialogBase/modal-footer.slds.css +62 -64
- package/src/lightning/interactiveDialogBase/modal-header.slds.css +47 -48
- package/src/lightning/layout/__docs__/layout.md +13 -13
- package/src/lightning/layout/__examples__/pullToBoundary/pullToBoundary.css +1 -1
- package/src/lightning/layout/__examples__/simple/simple.css +2 -2
- package/src/lightning/layout/__examples__/verticalAlignCenter/verticalAlignCenter.css +3 -3
- package/src/lightning/layout/__examples__/verticalAlignStretch/verticalAlignStretch.css +3 -3
- package/src/lightning/layout/layout.css +1 -1
- package/src/lightning/layout/layout.lbc.native.css +1 -1
- package/src/lightning/layout/layout.lbc.synthetic.css +1 -2
- package/src/lightning/layoutItem/layoutItem.css +1 -1
- package/src/lightning/lookupAddress/form-element.slds.css +4 -4
- package/src/lightning/lookupAddress/listbox.slds.css +181 -175
- package/src/lightning/lookupAddress/lookup-address.slds.css +4 -4
- package/src/lightning/lookupAddress/lookupAddress.css +0 -1
- package/src/lightning/lookupAddress/lookupAddress.lbc.native.css +0 -1
- package/src/lightning/mediaUtils/__docs__/mediaUtils.md +20 -17
- package/src/lightning/menuDivider/menu-divider.slds.css +8 -8
- package/src/lightning/menuItem/menu-item.slds.css +94 -82
- package/src/lightning/menuItem/menuItem.lbc.synthetic.css +1 -1
- package/src/lightning/menuSubheader/menu-subheader.slds.css +13 -13
- package/src/lightning/modal/__docs__/migration.md +95 -91
- package/src/lightning/modal/__docs__/modal.md +28 -22
- package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +14 -21
- package/src/lightning/modalBase/modal-base.slds.css +198 -194
- package/src/lightning/modalBase/modalBase.lbc.synthetic.css +2 -2
- package/src/lightning/modalBody/__docs__/modalBody.md +0 -1
- package/src/lightning/modalBody/modal-body.slds.css +33 -34
- package/src/lightning/modalFooter/__docs__/modalFooter.md +1 -2
- package/src/lightning/modalFooter/modal-footer.slds.css +62 -64
- package/src/lightning/modalHeader/__docs__/modalHeader.md +1 -0
- package/src/lightning/modalHeader/modal-header.slds.css +47 -48
- package/src/lightning/modalHeader/modalHeader.css +2 -1
- package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.css +2 -3
- package/src/lightning/navigation/__docs__/navigation.md +2 -3
- package/src/lightning/overlay/__docs__/overlay.md +3 -3
- package/src/lightning/overlay/__examples__/basic/basic.css +2 -2
- package/src/lightning/picklist/README.md +9 -9
- package/src/lightning/pill/__docs__/pill.md +3 -3
- package/src/lightning/pill/avatar.slds.css +96 -97
- package/src/lightning/pill/link.css +1 -1
- package/src/lightning/pill/pill.slds.css +154 -153
- package/src/lightning/pill/plain.css +1 -1
- package/src/lightning/pill/plainLink.css +1 -1
- package/src/lightning/pillContainer/__docs__/pillContainer.md +16 -15
- package/src/lightning/pillContainer/barePillContainer.lbc.native.css +1 -1
- package/src/lightning/pillContainer/button.slds.css +32 -17
- package/src/lightning/pillContainer/listbox.slds.css +181 -175
- package/src/lightning/pillContainer/pill-container.slds.css +34 -34
- package/src/lightning/pillContainer/pill.slds.css +154 -153
- package/src/lightning/pillContainer/standardPillContainer.css +1 -1
- package/src/lightning/popup/README.md +3 -3
- package/src/lightning/popup/__requirements__/requirements.md +25 -25
- package/src/lightning/popup/popover.slds.css +127 -128
- package/src/lightning/primitiveBubble/tooltip.slds.css +105 -99
- package/src/lightning/primitiveButton/primitiveButton.js +0 -21
- package/src/lightning/primitiveCellButton/primitiveCellButton.js +6 -1
- package/src/lightning/primitiveCellCheckbox/checkbox.css +0 -1
- package/src/lightning/primitiveCellCheckbox/checkbox.lbc.native.css +1 -1
- package/src/lightning/primitiveCellCheckbox/input-checkbox.slds.css +130 -124
- package/src/lightning/primitiveCellCheckbox/input-radio-group.slds.css +6 -5
- package/src/lightning/primitiveCellCheckbox/primitiveCellCheckbox.js +13 -8
- package/src/lightning/primitiveCellCheckbox/radio.lbc.native.css +1 -1
- package/src/lightning/primitiveCellFactory/button-icon.slds.css +50 -31
- package/src/lightning/primitiveCellFactory/primitive-cell-factory.slds.css +0 -1
- package/src/lightning/primitiveCellFactory/primitiveCellFactory.js +7 -11
- package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +69 -70
- package/src/lightning/primitiveColumnSorter/form-element.slds.css +4 -4
- package/src/lightning/primitiveColumnSorter/input-radio-group.slds.css +6 -5
- package/src/lightning/primitiveColumnSorter/primitive-column-sorter.slds.css +0 -1
- package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.css +13 -7
- package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.html +1 -1
- package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.js +2 -0
- package/src/lightning/primitiveCoordinateItem/__examples__/basic/basic.js +1 -2
- package/src/lightning/primitiveCoordinateItem/button.slds.css +32 -17
- package/src/lightning/primitiveCoordinateItem/coordinate-item.slds.css +2 -1
- package/src/lightning/primitiveCoordinateItem/primitiveCoordinateItem.css +1 -1
- package/src/lightning/primitiveCustomCell/primitiveCustomCell.js +8 -7
- package/src/lightning/primitiveDatatableCell/primitiveDatatableCell.js +4 -2
- package/src/lightning/primitiveDatatableIeditPanel/popover.slds.css +127 -128
- package/src/lightning/primitiveDatatableStatusBar/button.slds.css +32 -17
- package/src/lightning/primitiveDatatableStatusBar/form-footer.slds.css +32 -32
- package/src/lightning/primitiveDatatableStatusBar/primitiveDatatableStatusBar.css +1 -1
- package/src/lightning/primitiveDatatableStatusBar/primitiveDatatableStatusBar.js +3 -1
- package/src/lightning/primitiveDatatableTooltip/button-icon.slds.css +50 -31
- package/src/lightning/primitiveDatatableTooltip/button.slds.css +32 -17
- package/src/lightning/primitiveDatatableTooltip/form-footer.slds.css +32 -32
- package/src/lightning/primitiveDatatableTooltip/primitiveDatatableTooltip.css +1 -1
- package/src/lightning/primitiveDatatableTooltip/primitiveDatatableTooltip.js +5 -6
- package/src/lightning/primitiveDatatableTooltip/primitiveDatatableTooltip.lbc.native.css +1 -1
- package/src/lightning/primitiveDatatableTooltipBubble/popover.slds.css +127 -128
- package/src/lightning/primitiveDatatableTooltipBubble/primitive-datatable-tooltip-bubble.slds.css +9 -7
- package/src/lightning/primitiveDatatableTooltipBubble/primitiveDatatableTooltipBubble.css +1 -1
- package/src/lightning/primitiveHeaderActions/primitiveHeaderActions.lbc.native.css +1 -1
- package/src/lightning/primitiveHeaderFactory/form-element.slds.css +4 -4
- package/src/lightning/primitiveHeaderFactory/input-checkbox.slds.css +130 -124
- package/src/lightning/primitiveHeaderFactory/primitive-header-factory.slds.css +9 -4
- package/src/lightning/primitiveHeaderFactory/selectableHeader.css +1 -1
- package/src/lightning/primitiveHeaderFactory/selectableHeader.lbc.native.css +1 -1
- package/src/lightning/primitiveHeaderFactory/sortableHeader.lbc.synthetic.css +9 -3
- package/src/lightning/primitiveHeaderFactory/sortingMenuHeader.lbc.native.css +0 -1
- package/src/lightning/primitiveIcon/icon.slds.css +6 -2
- package/src/lightning/primitiveIcon/primitiveIcon.js +10 -2
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputCheckbox/input-checkbox.slds.css +130 -124
- package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputCheckboxButton/input-checkbox-button.slds.css +90 -79
- package/src/lightning/primitiveInputColor/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputColor/input-color.slds.css +27 -28
- package/src/lightning/primitiveInputColor/input-text.slds.css +172 -190
- package/src/lightning/primitiveInputColor/primitiveInputColor.css +1 -1
- package/src/lightning/primitiveInputFile/button.slds.css +32 -17
- package/src/lightning/primitiveInputFile/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputFile/input-file.slds.css +58 -59
- package/src/lightning/primitiveInputSimple/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputSimple/input-text.slds.css +172 -190
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.lbc.synthetic.css +1 -1
- package/src/lightning/primitiveInputToggle/form-element.slds.css +4 -4
- package/src/lightning/primitiveInputToggle/input-toggle.slds.css +134 -118
- package/src/lightning/primitiveResizeHandler/primitive-resize-handler.slds.css +0 -1
- package/src/lightning/primitiveTreegridCellToggle/button-icon.slds.css +50 -31
- package/src/lightning/progressBar/progress-bar.slds.css +38 -39
- package/src/lightning/progressIndicator/__docs__/progressIndicator.md +2 -2
- package/src/lightning/progressIndicator/progress-indicator.slds.css +65 -65
- package/src/lightning/progressIndicator/progressIndicator.css +1 -1
- package/src/lightning/progressIndicator/progressIndicator.lbc.native.css +1 -1
- package/src/lightning/progressRing/progress-ring.slds.css +112 -112
- package/src/lightning/progressStep/progress-step.slds.css +223 -203
- package/src/lightning/prompt/__docs__/prompt.md +14 -14
- package/src/lightning/prompt/form-element.slds.css +4 -4
- package/src/lightning/prompt/input-text.slds.css +172 -190
- package/src/lightning/prompt/prompt.css +1 -1
- package/src/lightning/radioGroup/__docs__/radioGroup.md +6 -6
- package/src/lightning/radioGroup/form-element.slds.css +4 -4
- package/src/lightning/radioGroup/input-radio-group.slds.css +6 -5
- package/src/lightning/relativeDateTime/__docs__/relativeDateTime.md +10 -10
- package/src/lightning/select/__docs__/select.md +5 -5
- package/src/lightning/select/form-element.slds.css +4 -4
- package/src/lightning/select/select.css +1 -1
- package/src/lightning/select/select.html +6 -3
- package/src/lightning/select/select.lbc.native.css +2 -2
- package/src/lightning/select/select.slds.css +117 -115
- package/src/lightning/sldsCommon/sldsCommon.css +0 -1
- package/src/lightning/sldsFormElementUtils/sldsFormElementUtils.css +63 -29
- package/src/lightning/sldsMediaObject/sldsMediaObject.css +1 -3
- package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.css +0 -1
- package/src/lightning/sldsUtilsBorders/sldsUtilsBorders.css +8 -5
- package/src/lightning/sldsUtilsBox/sldsUtilsBox.css +0 -1
- package/src/lightning/sldsUtilsFloats/sldsUtilsFloats.css +1 -2
- package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.css +84 -85
- package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.css +0 -1
- package/src/lightning/sldsUtilsLineClamp/sldsUtilsLineClamp.css +0 -1
- package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.css +0 -1
- package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.css +0 -1
- package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.css +4 -5
- package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.css +0 -1
- package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.css +47 -23
- package/src/lightning/sldsUtilsTruncation/sldsUtilsTruncation.css +0 -1
- package/src/lightning/sldsUtilsVisibility/sldsUtilsVisibility.css +0 -1
- package/src/lightning/slider/README.md +4 -4
- package/src/lightning/slider/form-element.slds.css +4 -4
- package/src/lightning/slider/slider.slds.css +106 -92
- package/src/lightning/spinner/__examples__/if/if.css +1 -1
- package/src/lightning/spinner/__examples__/sizes/sizes.css +1 -1
- package/src/lightning/spinner/spinner.slds.css +327 -326
- package/src/lightning/stackedTab/stacked-tab.slds.css +8 -7
- package/src/lightning/stackedTab/stackedTab.css +1 -1
- package/src/lightning/stackedTab/stackedTab.lbc.native.css +1 -1
- package/src/lightning/stackedTabset/stacked-tabset.slds.css +8 -8
- package/src/lightning/stackedTabset/stackedTabset.css +1 -1
- package/src/lightning/stackedTabset/stackedTabset.lbc.native.css +1 -1
- package/src/lightning/tab/tab.css +1 -1
- package/src/lightning/tab/tab.slds.css +44 -51
- package/src/lightning/tabBar/tab-bar.slds.css +405 -284
- package/src/lightning/tabset/__docs__/tabset.md +4 -4
- package/src/lightning/tabset/tabset.slds.css +12 -12
- package/src/lightning/textarea/__docs__/textarea.md +7 -7
- package/src/lightning/textarea/form-element.slds.css +4 -4
- package/src/lightning/textarea/textarea.js +22 -0
- package/src/lightning/textarea/textarea.lbc.synthetic.css +0 -1
- package/src/lightning/textarea/textarea.slds.css +124 -99
- package/src/lightning/tile/tile.slds.css +0 -1
- package/src/lightning/timepicker/form-element.slds.css +4 -4
- package/src/lightning/timepicker/timepicker.slds.css +13 -14
- package/src/lightning/toast/__docs__/toast.md +19 -19
- package/src/lightning/toast/button-icon.slds.css +50 -31
- package/src/lightning/toast/icon.slds.css +6 -2
- package/src/lightning/toast/toast.lbc.synthetic.css +12 -6
- package/src/lightning/toast/toast.slds.css +90 -90
- package/src/lightning/toastContainer/__docs__/toastContainer.md +4 -1
- package/src/lightning/toastContainer/toast.slds.css +90 -90
- package/src/lightning/toastContainer/toastContainer.lbc.synthetic.css +6 -6
- package/src/lightning/tree/tree.slds.css +1 -1
- package/src/lightning/treeGrid/__docs__/treeGrid.md +128 -64
- package/src/lightning/treeGrid/treeGrid.js +3 -1
- package/src/lightning/treeItem/calendar.slds.css +188 -191
- package/src/lightning/verticalNavigation/__docs__/verticalNavigation.md +5 -5
- package/src/lightning/verticalNavigation/verticalNavigation.css +1 -1
- package/src/lightning/verticalNavigationItemBadge/badge.slds.css +71 -56
- package/src/lightning/verticalNavigationOverflow/button.slds.css +32 -17
- package/src/lightning/verticalNavigationOverflow/vertical-navigation-section.slds.css +8 -8
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.css +1 -1
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.lbc.synthetic.css +1 -1
- package/src/lightning/verticalNavigationSection/vertical-navigation-section.slds.css +8 -8
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.css +1 -1
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.lbc.synthetic.css +1 -1
- package/scopedImports/@salesforce-gate-bc.256.enableReactiveCarousel.js +0 -6
- package/scopedImports/@salesforce-gate-colorIconsMenuItem.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-datatableIconSrc.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-formattedDateTimeDateStyle.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-groupedComboboxVariants.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-inputErrorIcon.ce.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-lookups.lookupMetadataLayoutServiceBased.js +0 -6
- package/scopedImports/@salesforce-gate-modalReduceMotionFix.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-overlaySldsScopeClass.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-primitiveThemeProviderDisabled.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-recordFormFieldCaching.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-regexCustomElementCheck.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-sanitizeURL.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-treeGridCustomTypes.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-treeGridStaticCustomTypes.bc.ltng.js +0 -6
- package/scopedImports/@salesforce-gate-treeItemEndIcon.bc.ltng.js +0 -6
|
@@ -31,18 +31,18 @@ Salesforce Lightning Design System.
|
|
|
31
31
|
`lightning-datatable` is not supported on mobile devices. Supported features
|
|
32
32
|
include:
|
|
33
33
|
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
34
|
+
- Displaying and formatting of columns with appropriate data types
|
|
35
|
+
- Infinite scrolling of rows
|
|
36
|
+
- Inline editing for some data types
|
|
37
|
+
- Header actions
|
|
38
|
+
- Header wrapping
|
|
39
|
+
- Row-level actions
|
|
40
|
+
- Resizing of columns
|
|
41
|
+
- Selecting of rows
|
|
42
|
+
- Sorting of columns by ascending and descending order
|
|
43
|
+
- Text wrapping and clipping
|
|
44
|
+
- Row numbering column
|
|
45
|
+
- Cell content alignment
|
|
46
46
|
|
|
47
47
|
Tables can be populated during initialization using the `data`, `columns`, and
|
|
48
48
|
`key-field` attributes. The `key-field` attribute is required for correct table behavior.
|
|
@@ -207,8 +207,8 @@ To return the data in each selected row, use the `getSelectedRows()` method. Thi
|
|
|
207
207
|
key-field="id"
|
|
208
208
|
data={data}
|
|
209
209
|
columns={columns}></lightning-datatable>
|
|
210
|
-
<lightning-button
|
|
211
|
-
label="Get Selected Row"
|
|
210
|
+
<lightning-button
|
|
211
|
+
label="Get Selected Row"
|
|
212
212
|
onclick={handleGetSelected}></lightning-button>
|
|
213
213
|
<p>{selectedStr}</p>
|
|
214
214
|
```
|
|
@@ -299,14 +299,14 @@ aspects of your columns.
|
|
|
299
299
|
| Property | Type | Description |
|
|
300
300
|
| ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
301
301
|
| actions | object | Appends a dropdown menu of actions to a column. You must pass in a list of label-name pairs. |
|
|
302
|
-
| cellAttributes | object | Provides additional customization, such as appending an icon to the output. For more information, see **Appending an Icon to Column Data**.
|
|
302
|
+
| cellAttributes | object | Provides additional customization using `alignment` and `class` properties, in addition to `icon*` properties such as for appending an icon to the output. For more information, see **Appending an Icon to Column Data**. |
|
|
303
303
|
| editable | boolean | Specifies whether a column supports inline editing. The default is false. |
|
|
304
304
|
| fieldName | string | Required. The name that binds the columns attributes to the associated data. Each columns attribute must correspond to an item in the data array. |
|
|
305
|
-
| fixedWidth | integer | Specifies the width of a column in pixels and makes the column non-resizable.If both `fixedWidth` and `initialWidth` values are provided, `initialWidth` is ignored.
|
|
305
|
+
| fixedWidth | integer | Specifies the width of a column in pixels and makes the column non-resizable. If both `fixedWidth` and `initialWidth` values are provided, `initialWidth` is ignored. |
|
|
306
306
|
| hideDefaultActions | boolean | Specifies whether to hide the default header actions on a column. The default is false. For more information, see **Creating Header Actions**. |
|
|
307
307
|
| hideLabel | boolean | Specifies whether to hide the label on a column. The default is false. For more information, see **Displaying an Icon Instead of a Column Label**. |
|
|
308
308
|
| iconName | string | The Lightning Design System name of the icon. Names are written in the format standard:opportunity. The icon is appended to the left of the header label. If `hideLabel` is provided, only the icon displays in the column header. |
|
|
309
|
-
| imgSrc | string | The URI for a custom icon. The icon is appended to the left of the header label. If `hideLabel` is provided, only the icon displays in the column header. If there's an error loading the URI, `iconName` is used as a fallback.
|
|
309
|
+
| imgSrc | string | The URI for a custom icon. The icon is appended to the left of the header label. If `hideLabel` is provided, only the icon displays in the column header. If there's an error loading the URI, `iconName` is used as a fallback. |
|
|
310
310
|
| initialWidth | integer | The width of the column when it's initialized, which must be within the `min-column-width` and` max-column-width` values, or within 50px and 1000px if they are not provided. |
|
|
311
311
|
| label | string | Required. The text label displayed in the column header. If `hideLabel` and `iconName` are set, the label is used as hover text for the icon and as the value of `aria-label`. |
|
|
312
312
|
| sortable | boolean | Specifies whether the column can be sorted. The default is false. |
|
|
@@ -1074,13 +1074,13 @@ handleResize(event) {
|
|
|
1074
1074
|
|
|
1075
1075
|
##### Managing the Resizing of Column Widths
|
|
1076
1076
|
|
|
1077
|
-
The `column-widths-mode` attribute accepts values of `fixed` (default) or `auto`.
|
|
1077
|
+
The `column-widths-mode` attribute accepts values of `fixed` (default) or `auto`. To provide granular control on your column widths, use this attribute with the `fixedWidth` and `initialWidth` column properties. See **Implementing Fixed Width Mode** and **Implementing Auto Width Mode** for more information.
|
|
1078
1078
|
|
|
1079
1079
|
Widths for the following columns are fixed and cannot be changed.
|
|
1080
1080
|
|
|
1081
|
-
-
|
|
1082
|
-
-
|
|
1083
|
-
-
|
|
1081
|
+
- Row Number column
|
|
1082
|
+
- Selection (checkbox) column
|
|
1083
|
+
- Action column
|
|
1084
1084
|
|
|
1085
1085
|
##### Implementing Fixed Width Mode
|
|
1086
1086
|
|
|
@@ -1090,10 +1090,10 @@ You can specify your own widths using `fixedWidth` or `initialWidth`. The widths
|
|
|
1090
1090
|
|
|
1091
1091
|
Setting new data on the columns doesn't trigger resizing for columns, unless the new column definition specifies a change in `fixedWidth` or `initialWidth` values. In `fixed` mode, the columns automatically resizes and maintain equal widths when:
|
|
1092
1092
|
|
|
1093
|
-
-
|
|
1094
|
-
-
|
|
1095
|
-
-
|
|
1096
|
-
-
|
|
1093
|
+
- The browser window is resized
|
|
1094
|
+
- The parent container width for the datatable is changed
|
|
1095
|
+
- The `row-number-offset` value is changed
|
|
1096
|
+
- More or less data is passed in
|
|
1097
1097
|
|
|
1098
1098
|
When you manually resize a column to a larger width, the other columns maintain their widths, displaying a scrollbar to enable scrolling to the end of the table columns. When you manually resize to a smaller width, the other columns also maintain their widths.
|
|
1099
1099
|
|
|
@@ -1103,8 +1103,8 @@ You can resize manually using a mouse or a keyboard. On a keyboard, press enter
|
|
|
1103
1103
|
|
|
1104
1104
|
To trigger resizing of columns according to the length or size of data in a column, set `column-widths-mode="auto"`. In `auto` width mode, the columns automatically resize when:
|
|
1105
1105
|
|
|
1106
|
-
-
|
|
1107
|
-
-
|
|
1106
|
+
- Data changes in at least one row and the number of rows stays the same
|
|
1107
|
+
- The column definition changes, such as a change in a column property or the number of columns
|
|
1108
1108
|
|
|
1109
1109
|
Pass a new reference of columns with changes for resize to take effect. The columns don't resize if there's only a change in the number of records in the data.
|
|
1110
1110
|
|
|
@@ -1118,9 +1118,9 @@ When you manually resize a column, the other columns maintain their widths. This
|
|
|
1118
1118
|
|
|
1119
1119
|
The columns keep their width ratios while adjusting the column widths when:
|
|
1120
1120
|
|
|
1121
|
-
-
|
|
1122
|
-
-
|
|
1123
|
-
-
|
|
1121
|
+
- The browser window is resized
|
|
1122
|
+
- The parent container width for the datatable is changed
|
|
1123
|
+
- The `rowNumberOffset` value is changed
|
|
1124
1124
|
|
|
1125
1125
|
Auto width mode is supported for containers with block display, which corresponds to the `display: block` CSS property.
|
|
1126
1126
|
`lightning-datatable` doesn't fully support containers with `display:inline-block` or flex properties.
|
|
@@ -1191,27 +1191,33 @@ rows a and b will be selected.
|
|
|
1191
1191
|
#### Sorting Data By Column
|
|
1192
1192
|
|
|
1193
1193
|
To enable sorting of row data by a column label, set `sortable` to `true` for
|
|
1194
|
-
the column on which you want to enable sorting.
|
|
1195
|
-
`fieldName` attribute on the column. Clicking a column header sorts rows by
|
|
1196
|
-
ascending order unless the `defaultSortDirection` is changed, and clicking it
|
|
1197
|
-
subsequently reverses the order. Handle the `onsort` event handler to update
|
|
1198
|
-
the table with the new column index and sort direction.
|
|
1194
|
+
the column on which you want to enable sorting. Clicking a column header sorts rows by ascending order, and clicking it subsequently reverses the order. Handle the `onsort` event to update the table with the new column index and sort direction.
|
|
1199
1195
|
|
|
1200
|
-
Here's an example of
|
|
1201
|
-
event handler.
|
|
1196
|
+
Here's an example of an `onsort` event handler.
|
|
1202
1197
|
|
|
1203
1198
|
```javascript
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1199
|
+
data = data;
|
|
1200
|
+
columns = columns;
|
|
1201
|
+
sortDirection = 'asc';
|
|
1202
|
+
sortedBy;
|
|
1203
|
+
// The method onsort event handler
|
|
1204
|
+
handleSort(event) {
|
|
1205
|
+
const { fieldName: sortedByField, sortDirection } = event.detail;
|
|
1206
|
+
const cloneData = [...this.data];
|
|
1207
|
+
|
|
1208
|
+
cloneData.sort(this.sortBy(sortedByField, sortDirection === 'asc' ? 1 : -1));
|
|
1209
|
+
this.data = cloneData;
|
|
1210
|
+
this.sortDirection = sortDirection;
|
|
1211
|
+
this.sortedBy = sortedByField;
|
|
1212
|
+
}
|
|
1213
1213
|
```
|
|
1214
1214
|
|
|
1215
|
+
The handler assigns `fieldName` to `sortedByField`, which stores the name of the field that is currently being sorted. It also retrieves `sortDirection` from the `sort` event. On first sort, `sortDirection` is `asc`.
|
|
1216
|
+
|
|
1217
|
+
To keep the original data intact, `cloneData` creates a shallow copy of the `data` array. The handler passes in the comparison function `sortBy` and pass it to the [array sort() method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort). Then it updates the `data` property with the sorted data, `sortDirection` with the new sort direction, and `sortedBy` with the sorted column.
|
|
1218
|
+
|
|
1219
|
+
For more information, see the Sortable Column example in the Example tab.
|
|
1220
|
+
|
|
1215
1221
|
#### Working with Inline Editing
|
|
1216
1222
|
|
|
1217
1223
|
When you make a column editable, a pencil icon appears when you hover over the
|
|
@@ -1279,18 +1285,19 @@ To display errors for a column, you must make the column editable. When there's
|
|
|
1279
1285
|
|
|
1280
1286
|
For cells with standard types, the datatable uses the `lightning-input` component to handle editing of the cell content, and also to aid in handling error messages. To display error messages with custom data types, you can use `lightning-input` with the attribute `data-inputable` in your edit template. Then use the same techniques described here for displaying errors.
|
|
1281
1287
|
|
|
1282
|
-
To display error messages for any editable columns, specify the `errors` attribute in your
|
|
1288
|
+
To display error messages for any editable columns, specify the `errors` attribute in your `lightning-datatable` component.
|
|
1283
1289
|
|
|
1284
1290
|
The `errors` attribute represents an object that specifies a `rows` property to provide information for the rows that contain errors and a `table` property to provide error information to display for the table.
|
|
1285
1291
|
|
|
1286
1292
|
The `errors` attribute represents an object that accepts one or both of these properties.
|
|
1287
1293
|
|
|
1288
1294
|
- `rows`-Provides information to display errors at the row level.
|
|
1289
|
-
- `table`-Provides information to display errors at the bottom of the table.
|
|
1295
|
+
- `table`-Provides information to display errors at the bottom of the table. See **Display Errors for the Table**.
|
|
1290
1296
|
|
|
1291
1297
|
The `rows` object keys are the datatable’s `key-field` values, which provide a unique identifier for each row. Using this `key-field` value, you can provide custom errors on specific rows.
|
|
1292
1298
|
|
|
1293
1299
|
Customize the error messages using these properties in the `rows` object.
|
|
1300
|
+
|
|
1294
1301
|
- `title`-Title for the error tooltip.
|
|
1295
1302
|
- `messages`-Text of error messages, listed in an array.
|
|
1296
1303
|
- `fieldNames`-Fields that triggered errors. Order the field names in a simple array to match the messages in the `messages` array.
|
|
@@ -1323,7 +1330,6 @@ In this example, you can click a button to trigger the errors to display.
|
|
|
1323
1330
|
|
|
1324
1331
|
For row-level errors, define the error messages and field names in the `errors` object. To map the messages to `fieldNames`, specify an array of field names in the same order in which you specify the messages. In the example, when the error is triggered, the borders for the `amount` and `contact` cells in the row with the `key-field` 1 turn red to represent the error state. The messages are displayed in the tooltip in the number column, not on the cells themselves.
|
|
1325
1332
|
|
|
1326
|
-
|
|
1327
1333
|
```javascript
|
|
1328
1334
|
triggerError(event) {
|
|
1329
1335
|
this.errors = {
|
|
@@ -1345,7 +1351,6 @@ For row-level errors, define the error messages and field names in the `errors`
|
|
|
1345
1351
|
|
|
1346
1352
|
To display custom error messages under each field that has an error, you can specify the `fieldNames` property as an object of key-value pairs specifying the field name and the message like this:
|
|
1347
1353
|
|
|
1348
|
-
|
|
1349
1354
|
```javascript
|
|
1350
1355
|
triggerError(event) {
|
|
1351
1356
|
this.errors = {
|
|
@@ -1373,7 +1378,6 @@ If a cell is in the error state, the error message appears below the field when
|
|
|
1373
1378
|
|
|
1374
1379
|
To display error messages at the bottom of the table, use the `table` property in the `error` object like this:
|
|
1375
1380
|
|
|
1376
|
-
|
|
1377
1381
|
```javascript
|
|
1378
1382
|
triggerError(event) {
|
|
1379
1383
|
this.errors = {
|
|
@@ -1421,6 +1425,7 @@ To display errors on rows and at the bottom of the table, declare both the `rows
|
|
|
1421
1425
|
};
|
|
1422
1426
|
}
|
|
1423
1427
|
```
|
|
1428
|
+
|
|
1424
1429
|
#### Text Wrapping and Clipping
|
|
1425
1430
|
|
|
1426
1431
|
You can wrap or clip text within columns. Text wrapping expands the rows vertically to reveal more content. Text clipping truncates the content to a single line within the column.
|
|
@@ -1433,11 +1438,11 @@ content is clipped by default.
|
|
|
1433
1438
|
|
|
1434
1439
|
Text wrapping and clipping are not supported for row number columns and the following data types:
|
|
1435
1440
|
|
|
1436
|
-
-
|
|
1437
|
-
-
|
|
1438
|
-
-
|
|
1439
|
-
-
|
|
1440
|
-
-
|
|
1441
|
+
- action
|
|
1442
|
+
- boolean
|
|
1443
|
+
- button
|
|
1444
|
+
- button-icon
|
|
1445
|
+
- date-local
|
|
1441
1446
|
|
|
1442
1447
|
For `text` data type, text clipping converts newline characters to spaces and condenses multiple spaces or tabs to one space. Text clipping suppresses line breaks, truncates content to fit a single line in the column, and adds a trailing ellipsis. Text wrapping breaks lines and hyphenates words as needed to fit the column.
|
|
1443
1448
|
|
|
@@ -1475,9 +1480,9 @@ To return the name of the action, use the `event.target.action.name` property.
|
|
|
1475
1480
|
|
|
1476
1481
|
You can also wrap or clip the text in the column header with the `wrap-table-header` attribute. The property has three possible values:
|
|
1477
1482
|
|
|
1478
|
-
-
|
|
1479
|
-
-
|
|
1480
|
-
-
|
|
1483
|
+
- none (default)
|
|
1484
|
+
- all
|
|
1485
|
+
- by-column
|
|
1481
1486
|
|
|
1482
1487
|
`none` causes clipping on all column headers and `all` causes wrapping on all column headers. `by-column` wraps the header for columns that have the **Wrap text** setting enabled and clips the header for columns that have the **Clip text** setting enabled.
|
|
1483
1488
|
|
|
@@ -1555,9 +1560,9 @@ When using custom types, add additional attributes to make all elements of the c
|
|
|
1555
1560
|
|
|
1556
1561
|
Columns can be resized in action mode. First, navigate to the header using the arrow keys. Then, press the Tab key to activate the column divider to resize a column. You can resize a column by increasing or decreasing its width using one of the following key combinations.
|
|
1557
1562
|
|
|
1558
|
-
-
|
|
1559
|
-
-
|
|
1560
|
-
-
|
|
1563
|
+
- Right and Left Arrow keys
|
|
1564
|
+
- Up and Down Arrow keys
|
|
1565
|
+
- Page Up and Page Down keys
|
|
1561
1566
|
|
|
1562
1567
|
When you resize a column, the new column width is announced by assistive technology. To finish resizing the column and return to navigation mode, press the Esc key.
|
|
1563
1568
|
|
|
@@ -1575,8 +1580,8 @@ To programmatically apply focus to the active cell, use the `focus()` method. Fo
|
|
|
1575
1580
|
key-field="id"
|
|
1576
1581
|
data={data}
|
|
1577
1582
|
columns={columns}></lightning-datatable>
|
|
1578
|
-
<lightning-button
|
|
1579
|
-
label="Focus"
|
|
1583
|
+
<lightning-button
|
|
1584
|
+
label="Focus"
|
|
1580
1585
|
onclick={handleFocus}></lightning-button>
|
|
1581
1586
|
```
|
|
1582
1587
|
|
|
@@ -1664,16 +1669,16 @@ The event fired when the a table column is resized, which depends on which width
|
|
|
1664
1669
|
|
|
1665
1670
|
In the default `fixed` width mode, the `resize` event is fired when:
|
|
1666
1671
|
|
|
1667
|
-
-
|
|
1668
|
-
-
|
|
1669
|
-
-
|
|
1672
|
+
- The table renders initially
|
|
1673
|
+
- You manually resize a column
|
|
1674
|
+
- The number of columns changes on a subsequent rerender
|
|
1670
1675
|
|
|
1671
1676
|
In `auto` width mode, the event is fired only when you manually resize a column. See **Implementing Fixed Width Mode** and **Implementing Auto Width Mode** for more information.
|
|
1672
1677
|
|
|
1673
1678
|
The `resize` event is _not_ fired in the following cases.
|
|
1674
1679
|
|
|
1675
|
-
-
|
|
1676
|
-
-
|
|
1680
|
+
- You resize the browser or viewport, causing adjustments in the column widths
|
|
1681
|
+
- You change the column definition, but not the number of columns, causing adjustments in the column widths.
|
|
1677
1682
|
|
|
1678
1683
|
The `resize` event returns the following parameters.
|
|
1679
1684
|
|
|
@@ -1696,9 +1701,9 @@ The event fired when the row is selected.
|
|
|
1696
1701
|
|
|
1697
1702
|
The `rowselection` event returns the following parameter.
|
|
1698
1703
|
|
|
1699
|
-
| Parameter
|
|
1700
|
-
|
|
|
1701
|
-
| selectedRows
|
|
1704
|
+
| Parameter | Type | Description |
|
|
1705
|
+
| ------------- | ------ | ---------------------------------------------------------------------------------------------------------------------- |
|
|
1706
|
+
| selectedRows | object | The data in the rows that are selected. |
|
|
1702
1707
|
| config.action | string | The type of selection event. Valid options include 'selectAllRows', 'deselectAllRows', 'rowSelect', and 'rowDeselect'. |
|
|
1703
1708
|
|
|
1704
1709
|
The event properties are as follows.
|
|
@@ -1733,10 +1738,11 @@ The event fired when a column is sorted.
|
|
|
1733
1738
|
|
|
1734
1739
|
The `sort` event returns the following parameters.
|
|
1735
1740
|
|
|
1736
|
-
| Parameter
|
|
1737
|
-
|
|
|
1738
|
-
| fieldName
|
|
1739
|
-
|
|
|
1741
|
+
| Parameter | Type | Description |
|
|
1742
|
+
| ----------------- | ------- | -------------------------------------------------------------- |
|
|
1743
|
+
| fieldName | string | The fieldName that controls the sorting. |
|
|
1744
|
+
| isMultiColumnSort | boolean | Reserved for internal use. Defaults to false. |
|
|
1745
|
+
| sortDirection | string | The sorting direction. Valid options include 'asc' and 'desc'. |
|
|
1740
1746
|
|
|
1741
1747
|
The event properties are as follows.
|
|
1742
1748
|
|
|
@@ -1746,7 +1752,6 @@ The event properties are as follows.
|
|
|
1746
1752
|
| cancelable | false | This event has no default behavior that can be canceled. You cannot call `preventDefault()` on this event. |
|
|
1747
1753
|
| composed | false | This event does not propagate outside the template in which it was dispatched. |
|
|
1748
1754
|
|
|
1749
|
-
|
|
1750
1755
|
#### LWC Recipes
|
|
1751
1756
|
|
|
1752
1757
|
The [LWC Recipes GitHub repository](https://github.com/trailheadapps/lwc-recipes) contains code examples for Lightning Web Components that you can test in an org.
|
|
@@ -12,8 +12,8 @@ Multi-column sorting uses the same pattern as single-column sorting with some ad
|
|
|
12
12
|
|
|
13
13
|
Changes to specific attributes of `lightning-datatable` enable developers to use multi-column sorting. These changes include:
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
15
|
+
- `sorted-by`: Accepts either a single column's `fieldName` or an array of `fieldNames`.
|
|
16
|
+
- `sorted-direction`: Accepts either a single value of 'asc' or 'desc' or an array of such values.
|
|
17
17
|
|
|
18
18
|
The nth value in the `sorted-direction` array represents the sorting direction of the nth column listed in the `sorted-by` array. For example, a `sorted-direction` array may look like `['asc', 'desc', 'asc']` and its `sorted-by` array may be `['age', 'weight', 'height']`. In this case, `age` is sorted ascending, `weight` is sorted descending, and `height` is sorted ascending.
|
|
19
19
|
|
|
@@ -52,8 +52,8 @@ Multi-column sorting can be accessed either directly within the datatable or con
|
|
|
52
52
|
|
|
53
53
|
To access multi-column sort from within the datatable itself, add the following attributes to lightning-datatable:
|
|
54
54
|
|
|
55
|
-
-
|
|
56
|
-
-
|
|
55
|
+
- `render-mode`: Multi-column sorting is available for `role-based` and `role-based-inline` modes.
|
|
56
|
+
- `show-actions-menu`: Displays a button menu in the top-right corner of the datatable, where multi-column sorting rules can be configured through a modal.
|
|
57
57
|
|
|
58
58
|
The `lightning-datatable` markup for multi-column sorting should look like this:
|
|
59
59
|
|
|
@@ -6,114 +6,114 @@ Refer the below specifications for each mode and what each mode does in various
|
|
|
6
6
|
|
|
7
7
|
### INITIAL RENDER
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
|
|
9
|
+
- should size the columns based on the defined column widths when the column definitions are passed
|
|
10
|
+
and the columns have fixed or initialWidths defined in them using `fixedWidth` or `initialWidth` attribute.
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
- should size the columns by giving equal widths for all the columns when the column definitions have no defined widths (fixedWidth or initialWidth)
|
|
13
|
+
and no data is set yet.
|
|
14
|
+
Width is calculated by taking total available width for datatable and dividing equally amongst the columns. Columns widths
|
|
15
|
+
for certain types like Row Number, Selection column, Action column are controlled by the component and are fixed.
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
- should use same column widths as set currently when data is set at a later point and column definitions are already available.
|
|
18
18
|
|
|
19
19
|
### SUBSEQUENT RENDERS
|
|
20
20
|
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
- should adjust column widths and distribute widths according to first two rules when column definitions are changed. Change in
|
|
22
|
+
column definitions could be either change in number of columns or update in certain column(s). User needs to pass a new reference
|
|
23
|
+
of columns with changes for them to take effect.
|
|
24
24
|
|
|
25
|
-
-
|
|
26
|
-
|
|
25
|
+
- should use same column widths as set currently when the data is changed. Change in data could be either new data passed or data removed
|
|
26
|
+
or change in existing data.
|
|
27
27
|
|
|
28
|
-
-
|
|
28
|
+
- should adjust column widths as per first two rules when the row number offset defined by `rowNumberOffset` attribute is changed.
|
|
29
29
|
|
|
30
|
-
-
|
|
30
|
+
- should adjust column widths as per first two rules when the browser window is resized.
|
|
31
31
|
|
|
32
|
-
-
|
|
32
|
+
- should adjust column widths as per first two rules when the container containing the datatable changes in width.
|
|
33
33
|
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
- should use new resized width for a column when a column is manually resized and the rest of the columns should maintain their widths
|
|
35
|
+
(i.e) the table shouldnt fill container space if column width is reduced and table should show scrollbar if column width is increased manually.
|
|
36
|
+
Manually resized columns will get same fixed width henceforth.
|
|
37
|
+
Manual resizing can be done either using -
|
|
38
38
|
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
39
|
+
* using mouse
|
|
40
|
+
* using keyboard by pressing enter in the header cell, then tabbing to reach the resizer and pressing left or right arrow keys
|
|
41
|
+
* on a touchscreen device - tap on the desired column resizer area, move to desired width and then release
|
|
42
42
|
|
|
43
|
-
-
|
|
44
|
-
|
|
43
|
+
- should adjust column widths to fill the container space as per first two rules with the exception of manually-resized columns
|
|
44
|
+
when the container is resized due to browser resize or container width changes.
|
|
45
45
|
|
|
46
46
|
## AUTO WIDTHS MODE
|
|
47
47
|
|
|
48
48
|
### INITIAL RENDER
|
|
49
49
|
|
|
50
|
-
-
|
|
51
|
-
|
|
50
|
+
- should size the columns based on the defined column widths when the column definitions are passed
|
|
51
|
+
and the columns have fixed or initialWidths defined in them using `fixedWidth` or `initialWidth` attribute.
|
|
52
52
|
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
- should set widths of columns based on the visual width distribution of the column labels when the column definitions are passed but no data is set yet.
|
|
54
|
+
If a column has too long label, the width is clamped by the `maxColumnWidth` attribute set on the datatable which is 1000px by default. If a column gets
|
|
55
|
+
too small in width, the width is clamped to `minColumnWidth` attribute set on the datatable which is 50px by default.
|
|
56
|
+
With visual width distribution of labels in columns, columns which would take wide space if table was rendered with no width constraints, will get more width
|
|
57
|
+
as compared to columns which would take less space given their labels.
|
|
58
58
|
|
|
59
|
-
-
|
|
59
|
+
- should size columns based on the column labels and defined widths when some columns have fixed or initialWidths defined and some dont and no data is set yet.
|
|
60
60
|
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
- should set widths of columns based on the visual width distribution of the data in columns when the column definitions are already set and data is now set.
|
|
62
|
+
With visual width distribution of data in columns, columns which would take wide space if table was rendered with no width constraints, will get more width
|
|
63
|
+
as compared to columns which would take less space given the data in the columns. Same rules apply w.r.t to clamping to maxColumnWidth or minColumnWidth
|
|
64
|
+
when width would exceed maxColumnWidth or when width would be less than minColumnWidth resp. If a column with long content has wrapText set to true,
|
|
65
|
+
that column should take less space than it would have taken if there was no wrapText. It should be given width taking into consideration the visual distribution
|
|
66
|
+
of this column taking into account text wrapped lines.
|
|
67
67
|
|
|
68
68
|
### SUBSEQUENT RENDERS
|
|
69
69
|
|
|
70
|
-
-
|
|
70
|
+
- should trigger auto-resize of column widths with new ratios of data in columns when the data is changed (same number of rows)
|
|
71
71
|
|
|
72
|
-
-
|
|
73
|
-
|
|
72
|
+
- should not trigger resize of column widths at all when new data is passed or data is removed (different number of rows).
|
|
73
|
+
The columns should continue to use their set widths.
|
|
74
74
|
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
- should trigger auto-resize of column widths with new ratios when column definitions are changed. Change in
|
|
76
|
+
column definitions could be either change in number of columns or update in certain column(s). User needs to pass a new reference
|
|
77
|
+
of columns with changes for them to take effect.
|
|
78
78
|
|
|
79
|
-
-
|
|
79
|
+
- should keep the width ratios and adjust column widths to fit new screen size when the browser window is resized.
|
|
80
80
|
|
|
81
|
-
-
|
|
81
|
+
- should keep the width ratios and adjust column widths to fit new container size when the container containing the datatable changes in width.
|
|
82
82
|
|
|
83
|
-
-
|
|
83
|
+
- should adjust column widths with new ratios when the row number offset defined by `rowNumberOffset` attribute is changed.
|
|
84
84
|
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
- should use new resized width for a column when a column is manually resized and the rest of the columns should maintain their widths
|
|
86
|
+
(i.e) the table shouldnt fill container space if column width is reduced and table should show scrollbar if column width is increased manually.
|
|
87
|
+
Manually resized columns will get same fixed width henceforth.
|
|
88
|
+
Manual resizing can be done either using -
|
|
89
89
|
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
90
|
+
* using mouse
|
|
91
|
+
* using keyboard by pressing enter in the header cell, then tabbing to reach the resizer and pressing left or right arrow keys
|
|
92
|
+
* on a touchscreen device - tap on the desired column resizer area, move to desired width and then release
|
|
93
93
|
|
|
94
|
-
-
|
|
95
|
-
|
|
94
|
+
- should adjust column widths to fill the container space as per existing width ratios with the exception of manually-resized columns
|
|
95
|
+
when the container is resized due to browser resize or container width changes after manual resize of a column.
|
|
96
96
|
|
|
97
97
|
## Open questions
|
|
98
98
|
|
|
99
|
-
-
|
|
99
|
+
- TODO - Change from using width values stored in tracked variable to setting widths directly in dom
|
|
100
100
|
|
|
101
|
-
-
|
|
101
|
+
- TODO - When to fire resize event in cases above should be agreed upon and documented - Done
|
|
102
102
|
|
|
103
103
|
### IMPLEMENTATION DETAILS
|
|
104
104
|
|
|
105
|
-
-
|
|
105
|
+
- Datatable instantiates columnWidthManager
|
|
106
106
|
|
|
107
|
-
-
|
|
108
|
-
|
|
107
|
+
- columnWidthManager listens to all the parameters that widthManager should care about and sets flag if resizingIsNeeded
|
|
108
|
+
after rendering is done.
|
|
109
109
|
|
|
110
|
-
-
|
|
110
|
+
- columnWidthManager also keep a track of if the width resizing strategy should recalculate width ratios.
|
|
111
111
|
|
|
112
|
-
-
|
|
113
|
-
|
|
112
|
+
- During renderedCallback, columnWidthManager adjustColumnsSize is called which then checks the flag to see if resizing is needed
|
|
113
|
+
and calls appropriate strategy to adjust columns size.
|
|
114
114
|
|
|
115
|
-
-
|
|
116
|
-
|
|
115
|
+
- In case of autoWidthStrategy setting columns triggers resize computation and a rerender (since widths are changed in tracked var)
|
|
116
|
+
and then setting data triggers rerender, another resize and another rerender for widths.
|
|
117
117
|
|
|
118
|
-
-
|
|
119
|
-
|
|
118
|
+
- In case of fixedWidthStrategy setting columns triggers resize computation and a rerender (since widths are changed in tracked var)
|
|
119
|
+
but setting data doesnt trigger rerender for widths.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
-
|
|
1
|
+
- Column Widths Resizing Requirements
|
|
2
2
|
> For Specification regarding how datatable calculates column widths Refer _column_widths_requirements.md_
|