lightning-base-components 1.15.1-alpha → 1.15.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.
Files changed (57) hide show
  1. package/metadata/raptor.json +27 -2
  2. package/package.json +6 -2
  3. package/scopedImports/@salesforce-label-LightningMap.defaultTitle.js +1 -0
  4. package/src/lightning/alert/__docs__/alert.md +0 -2
  5. package/src/lightning/baseCombobox/baseCombobox.html +2 -1
  6. package/src/lightning/baseCombobox/baseCombobox.js +41 -6
  7. package/src/lightning/button/button.js +22 -1
  8. package/src/lightning/checkboxGroup/checkboxGroup.html +2 -2
  9. package/src/lightning/checkboxGroup/checkboxGroup.js +9 -5
  10. package/src/lightning/combobox/__docs__/combobox.md +3 -1
  11. package/src/lightning/combobox/combobox.js +0 -1
  12. package/src/lightning/confirm/__docs__/confirm.md +0 -2
  13. package/src/lightning/datatable/__docs__/datatable.md +45 -0
  14. package/src/lightning/datatable/__wdio__/utam/utam.html +15 -0
  15. package/src/lightning/datatable/__wdio__/utam/utam.spec.js +208 -183
  16. package/src/lightning/datatable/datatable.js +12 -7
  17. package/src/lightning/datatable/inlineEdit.js +0 -5
  18. package/src/lightning/datatable/inlineEditShared.js +4 -2
  19. package/src/lightning/datatable/keyboard.js +7 -3
  20. package/src/lightning/datatable/rowSelection.js +8 -2
  21. package/src/lightning/datatable/state.js +1 -0
  22. package/src/lightning/datatable/templates/table/table.html +2 -2
  23. package/src/lightning/datatable/wrapText.js +1 -0
  24. package/src/lightning/datepicker/datepicker.html +1 -0
  25. package/src/lightning/datepicker/datepicker.js +10 -0
  26. package/src/lightning/datetimepicker/datetimepicker.html +2 -0
  27. package/src/lightning/datetimepicker/datetimepicker.js +8 -0
  28. package/src/lightning/dualListbox/dualListbox.js +2 -1
  29. package/src/lightning/formattedAddress/__docs__/formattedAddress.md +3 -0
  30. package/src/lightning/formattedAddress/__examples__/customLocale/customLocale.html +22 -0
  31. package/src/lightning/formattedAddress/__examples__/customLocale/customLocale.js +3 -0
  32. package/src/lightning/formattedAddress/formattedAddress.js +7 -1
  33. package/src/lightning/groupedCombobox/groupedCombobox.html +2 -1
  34. package/src/lightning/groupedCombobox/groupedCombobox.js +16 -2
  35. package/src/lightning/input/input.html +6 -0
  36. package/src/lightning/input/input.js +2 -1
  37. package/src/lightning/inputAddress/__docs__/inputAddress.md +5 -0
  38. package/src/lightning/inputAddress/__examples__/customLocale/customLocale.html +12 -0
  39. package/src/lightning/inputAddress/__examples__/customLocale/customLocale.js +3 -0
  40. package/src/lightning/inputAddress/inputAddress.html +2 -0
  41. package/src/lightning/inputAddress/inputAddress.js +26 -3
  42. package/src/lightning/inputName/__docs__/inputName.md +2 -0
  43. package/src/lightning/inputName/inputName.html +4 -1
  44. package/src/lightning/inputUtils/inputUtils.js +11 -0
  45. package/src/lightning/picklist/picklist.js +6 -1
  46. package/src/lightning/prompt/__docs__/prompt.md +0 -2
  47. package/src/lightning/radioGroup/radioGroup.js +9 -0
  48. package/src/lightning/select/select.html +3 -1
  49. package/src/lightning/select/select.js +5 -1
  50. package/src/lightning/textarea/textarea.html +1 -0
  51. package/src/lightning/textarea/textarea.js +5 -0
  52. package/src/lightning/timepicker/timepicker.html +3 -1
  53. package/src/lightning/timepicker/timepicker.js +8 -0
  54. package/src/lightning/utilsPrivate/aria.js +26 -0
  55. package/src/lightning/utilsPrivate/linkify.js +1 -1
  56. package/src/lightning/utilsPrivate/utilsPrivate.js +7 -1
  57. package/src/lightning/icon/__component__/icon-spirite.spec.js +0 -59
@@ -49,7 +49,6 @@
49
49
  }
50
50
  ]
51
51
  },
52
- "analyticsDataServiceApi": {},
53
52
  "analyticsSmartDataDiscoveryApi": {},
54
53
  "analyticsWaveApi": {
55
54
  "minVersion": "52.0"
@@ -157,6 +156,9 @@
157
156
  {
158
157
  "name": "name"
159
158
  },
159
+ {
160
+ "name": "stretch"
161
+ },
160
162
  {
161
163
  "name": "type"
162
164
  },
@@ -562,6 +564,7 @@
562
564
  ]
563
565
  },
564
566
  "commerceApi": {},
567
+ "communityInfoApi": {},
565
568
  "communityMicrobatchingApi": {},
566
569
  "communityNavigationMenuApi": {},
567
570
  "communityRecordSeoPropertiesApi": {},
@@ -894,6 +897,9 @@
894
897
  {
895
898
  "name": "latitude"
896
899
  },
900
+ {
901
+ "name": "locale"
902
+ },
897
903
  {
898
904
  "name": "longitude"
899
905
  },
@@ -1169,6 +1175,9 @@
1169
1175
  "groupedCombobox": {
1170
1176
  "slotNames": [],
1171
1177
  "properties": [
1178
+ {
1179
+ "name": "disableDefaultHighlight"
1180
+ },
1172
1181
  {
1173
1182
  "name": "disabled"
1174
1183
  },
@@ -1350,11 +1359,13 @@
1350
1359
  "slotNames": []
1351
1360
  },
1352
1361
  "iconUtils": {},
1362
+ "industriesActionPlanApi": {},
1353
1363
  "industriesCibApi": {},
1354
1364
  "industriesClmApi": {},
1355
1365
  "industriesDecisionMatrixDesignerApi": {},
1356
1366
  "industriesEinsteinAIAcceleratorApi": {},
1357
1367
  "industriesExplainabilityApi": {},
1368
+ "industriesHealthcloudApi": {},
1358
1369
  "industriesHealthcloudHpiApi": {},
1359
1370
  "industriesIdentityVerificationApi": {},
1360
1371
  "industriesInterestTaggingApi": {},
@@ -1362,6 +1373,7 @@
1362
1373
  "industriesPublicSectorApi": {},
1363
1374
  "industriesRcgTenantmanagementApi": {},
1364
1375
  "industriesRuleBuilderApi": {},
1376
+ "industriesServiceExcellenceApi": {},
1365
1377
  "industriesSustainabilityBeiApi": {},
1366
1378
  "industriesSustainabilityDgfApi": {},
1367
1379
  "industriesSustainabilityRecalculateApi": {},
@@ -1546,6 +1558,9 @@
1546
1558
  {
1547
1559
  "name": "addressLabel"
1548
1560
  },
1561
+ {
1562
+ "name": "addressLookupLabel"
1563
+ },
1549
1564
  {
1550
1565
  "name": "addressLookupPlaceholder"
1551
1566
  },
@@ -1579,6 +1594,9 @@
1579
1594
  {
1580
1595
  "name": "fieldLevelHelp"
1581
1596
  },
1597
+ {
1598
+ "name": "locale"
1599
+ },
1582
1600
  {
1583
1601
  "name": "postalCode"
1584
1602
  },
@@ -2456,6 +2474,9 @@
2456
2474
  {
2457
2475
  "name": "size"
2458
2476
  },
2477
+ {
2478
+ "name": "suppressNoneOption"
2479
+ },
2459
2480
  {
2460
2481
  "name": "validity"
2461
2482
  },
@@ -2550,6 +2571,7 @@
2550
2571
  }
2551
2572
  ]
2552
2573
  },
2574
+ "platformNamedCredentialApi": {},
2553
2575
  "platformNotificationUtils": {},
2554
2576
  "platformOverlayUtils": {},
2555
2577
  "platformResourceLoader": {
@@ -2900,6 +2922,7 @@
2900
2922
  }
2901
2923
  ]
2902
2924
  },
2925
+ "refresh": {},
2903
2926
  "relativeDateTime": {
2904
2927
  "minVersion": "0.0",
2905
2928
  "slotNames": [],
@@ -2977,6 +3000,7 @@
2977
3000
  ]
2978
3001
  },
2979
3002
  "routingService": {},
3003
+ "salesEnablementProgramApi": {},
2980
3004
  "select": {
2981
3005
  "slotNames": [],
2982
3006
  "properties": [
@@ -3422,7 +3446,6 @@
3422
3446
  "uiRelatedListApi": {
3423
3447
  "minVersion": "53.0"
3424
3448
  },
3425
- "unstable_analyticsDataServiceApi": {},
3426
3449
  "unstable_analyticsSmartDataDiscoveryApi": {},
3427
3450
  "unstable_analyticsWaveApi": {},
3428
3451
  "unstable_analyticsWavePrivateApi": {},
@@ -3449,6 +3472,7 @@
3449
3472
  "unstable_uiActionsApi": {},
3450
3473
  "unstable_uiAppsApi": {},
3451
3474
  "unstable_uiDuplicatesApi": {},
3475
+ "unstable_uiGraphQLApi": {},
3452
3476
  "unstable_uiLayoutApi": {},
3453
3477
  "unstable_uiListApi": {},
3454
3478
  "unstable_uiListsApi": {},
@@ -3458,6 +3482,7 @@
3458
3482
  "unstable_uiRecordApi": {},
3459
3483
  "unstable_uiRecordAvatarApi": {},
3460
3484
  "unstable_uiRelatedListApi": {},
3485
+ "unstable_uiSearchApi": {},
3461
3486
  "userConsentCookie": {
3462
3487
  "minVersion": "53.0"
3463
3488
  },
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "lightning-base-components",
3
- "version": "1.15.1-alpha",
3
+ "version": "1.15.2-alpha",
4
4
  "engines": {
5
- "node": ">=14.16.0"
5
+ "node": ">=14.18.2"
6
6
  },
7
7
  "files": [
8
8
  "external",
@@ -881,6 +881,10 @@
881
881
  "name": "@salesforce/label/LightningMap.titleWithAddress",
882
882
  "path": "scopedImports/@salesforce-label-LightningMap.titleWithAddress.js"
883
883
  },
884
+ {
885
+ "name": "@salesforce/label/LightningMap.defaultTitle",
886
+ "path": "scopedImports/@salesforce-label-LightningMap.defaultTitle.js"
887
+ },
884
888
  {
885
889
  "name": "@salesforce/label/LightningPrimitiveCoordinate.selected",
886
890
  "path": "scopedImports/@salesforce-label-LightningPrimitiveCoordinate.selected.js"
@@ -0,0 +1 @@
1
+ export default 'Map of {0} Markers';
@@ -1,7 +1,5 @@
1
1
  The `lightning/alert` module lets you create an alert modal within your component. Use `LightningAlert` on your components to communicate a state that affects the entire system, not just a feature or page.
2
2
 
3
- `lightning/alert` is not supported on mobile devices.
4
-
5
3
  Use `LightningAlert.open()` instead of the native `window.alert()` for a more consistent user experience. They have similar functions, but `LightningAlert.open()` works in cross-origin iframes, where the `.alert()` method is no longer supported in Chrome and Safari. Unlike `window.alert()`, `LightningAlert.open()` doesn't halt execution on the page, it returns a Promise. Use `async`/`await` or `.then()` for any code you want to execute after the alert has closed.
6
4
 
7
5
  Import `LightningAlert` from the `lightning/alert` module in the component that will launch the alert modal, and call `LightningAlert.open()` with your desired attributes.
@@ -44,6 +44,7 @@
44
44
  aria-expanded={computedAriaExpanded}
45
45
  aria-haspopup="listbox"
46
46
  name={name}
47
+ role="combobox"
47
48
  data-value={computedInputValue}
48
49
  disabled={disabled}
49
50
  aria-label={computedButtonTriggerAriaLabel}
@@ -60,7 +61,7 @@
60
61
  </span>
61
62
  </button>
62
63
  </template>
63
- <template if:true={hasInputPill}>
64
+ <template if:true={isCloseVisible}>
64
65
  <div class="slds-input__icon-group slds-input__icon-group_right">
65
66
  <button onclick={handlePillRemove} type="button"
66
67
  class="slds-button slds-button_icon slds-input__icon slds-input__icon_right"
@@ -13,6 +13,7 @@ import {
13
13
  normalizeBoolean,
14
14
  normalizeString,
15
15
  synchronizeAttrs,
16
+ computeAriaInvalid,
16
17
  } from 'lightning/utilsPrivate';
17
18
  // remove-next-line-for-c-namespace
18
19
  import { AutoPosition, Direction } from 'lightning/positionLibrary';
@@ -39,6 +40,7 @@ const ARIA_LABELLEDBY = 'aria-labelledby';
39
40
  const ARIA_DESCRIBEDBY = 'aria-describedby';
40
41
  const ARIA_LABEL = 'aria-label';
41
42
  const ARIA_ACTIVEDESCENDANT = 'aria-activedescendant';
43
+ const ARIA_INVALID = 'aria-invalid';
42
44
 
43
45
  export default class LightningBaseCombobox extends LightningElement {
44
46
  static delegatesFocus = true;
@@ -89,6 +91,8 @@ export default class LightningBaseCombobox extends LightningElement {
89
91
  _inputAriaControls;
90
92
  _activeElementDomId;
91
93
  _autocomplete = 'off';
94
+ originDisableDefaultHighlight;
95
+ privateDisableDefaultHighlight;
92
96
 
93
97
  constructor() {
94
98
  super();
@@ -276,6 +280,21 @@ export default class LightningBaseCombobox extends LightningElement {
276
280
  }
277
281
  }
278
282
 
283
+ /**
284
+ * Whether disable the highlighting default item behavior
285
+ *
286
+ * @type {boolean}
287
+ * @memberof LightningBaseCombobox
288
+ */
289
+ @api
290
+ get disableDefaultHighlight() {
291
+ return this.originDisableDefaultHighlight;
292
+ }
293
+ set disableDefaultHighlight(value) {
294
+ this.originDisableDefaultHighlight = value;
295
+ this.privateDisableDefaultHighlight = normalizeBoolean(value);
296
+ }
297
+
279
298
  @api
280
299
  highlightInputText() {
281
300
  if (this._connected) {
@@ -331,6 +350,7 @@ export default class LightningBaseCombobox extends LightningElement {
331
350
  [ARIA_LABEL]: this.isUserInputDisabled
332
351
  ? this.computedButtonTriggerAriaLabel
333
352
  : this.inputLabel,
353
+ [ARIA_INVALID]: this.computedAriaInvalid,
334
354
  });
335
355
  }
336
356
 
@@ -880,6 +900,13 @@ export default class LightningBaseCombobox extends LightningElement {
880
900
  return this.inputPill && Object.keys(this.inputPill).length > 0;
881
901
  }
882
902
 
903
+ get isCloseVisible() {
904
+ if (this.disabled) {
905
+ return false;
906
+ }
907
+ return this.hasInputPill;
908
+ }
909
+
883
910
  handlePillRemove() {
884
911
  this.inputElement.focus();
885
912
  this._events.dispatchPillRemove(this.inputPill);
@@ -924,12 +951,14 @@ export default class LightningBaseCombobox extends LightningElement {
924
951
 
925
952
  highlightDefaultItem() {
926
953
  this.removeHighlight();
927
- // eslint-disable-next-line @lwc/lwc/no-async-operation
928
- requestAnimationFrame(() => {
929
- this.highlightOptionAndScrollIntoView(
930
- this.findOptionElementByIndex(this._highlightedItemIndex)
931
- );
932
- });
954
+ if (!this.privateDisableDefaultHighlight) {
955
+ // eslint-disable-next-line @lwc/lwc/no-async-operation
956
+ requestAnimationFrame(() => {
957
+ this.highlightOptionAndScrollIntoView(
958
+ this.findOptionElementByIndex(this._highlightedItemIndex)
959
+ );
960
+ });
961
+ }
933
962
  }
934
963
 
935
964
  get isDropdownEmpty() {
@@ -1012,6 +1041,12 @@ export default class LightningBaseCombobox extends LightningElement {
1012
1041
  },
1013
1042
  };
1014
1043
  }
1044
+
1045
+ get computedAriaInvalid() {
1046
+ const ariaInvalid =
1047
+ this.template.host.getAttribute('data-aria-invalid');
1048
+ return computeAriaInvalid(ariaInvalid, true);
1049
+ }
1015
1050
  }
1016
1051
 
1017
1052
  function scrollIntoViewIfNeeded(element, scrollingParent) {
@@ -1,6 +1,9 @@
1
1
  import { api, track } from 'lwc';
2
2
  import { classSet } from 'lightning/utils';
3
- import { normalizeString as normalize } from 'lightning/utilsPrivate';
3
+ import {
4
+ normalizeString as normalize,
5
+ normalizeBoolean,
6
+ } from 'lightning/utilsPrivate';
4
7
  import LightningPrimitiveButton from 'lightning/primitiveButton';
5
8
  import template from './button.html';
6
9
 
@@ -9,6 +12,7 @@ import template from './button.html';
9
12
  */
10
13
  export default class LightningButton extends LightningPrimitiveButton {
11
14
  static delegatesFocus = true;
15
+ _stretch = false;
12
16
 
13
17
  /**
14
18
  * The name for the button element.
@@ -62,6 +66,22 @@ export default class LightningButton extends LightningPrimitiveButton {
62
66
  */
63
67
  @api iconPosition = 'left';
64
68
 
69
+ /**
70
+ * Setting it to true allows the button to take up the entire available width.
71
+ * This value defaults to false.
72
+ *
73
+ * @type {boolean}
74
+ * @default false
75
+ */
76
+ @api
77
+ get stretch() {
78
+ return this._stretch;
79
+ }
80
+
81
+ set stretch(value) {
82
+ this._stretch = normalizeBoolean(value);
83
+ }
84
+
65
85
  /**
66
86
  * Specifies the type of button.
67
87
  * Valid values are button, reset, and submit.
@@ -97,6 +117,7 @@ export default class LightningButton extends LightningPrimitiveButton {
97
117
  this.normalizedVariant === 'destructive-text',
98
118
  'slds-button_inverse': this.normalizedVariant === 'inverse',
99
119
  'slds-button_success': this.normalizedVariant === 'success',
120
+ 'slds-button_stretch': this.stretch,
100
121
  })
101
122
  .toString();
102
123
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <fieldset aria-describedby={computearaiDescriedBy}>
2
+ <fieldset>
3
3
 
4
4
  <legend class={computedLegendClass}>
5
5
  <template if:true={required}>
@@ -32,6 +32,6 @@
32
32
  <template if:true={_helpMessage}>
33
33
  <div id="helptext" data-helptext class="slds-form-element__help">{_helpMessage}</div>
34
34
  </template>
35
-
35
+
36
36
  </fieldset>
37
37
  </template>
@@ -97,8 +97,17 @@ export default class LightningCheckboxGroup extends LightningElement {
97
97
  });
98
98
  }
99
99
 
100
+ get fieldsetElement() {
101
+ return this.template.querySelector('fieldset');
102
+ }
103
+
100
104
  renderedCallback() {
101
105
  this.synchronizeA11y();
106
+ synchronizeAttrs(this.fieldsetElement, {
107
+ 'aria-describedby': getRealDOMId(
108
+ this.template.querySelector('[data-helptext]')
109
+ ),
110
+ });
102
111
  }
103
112
 
104
113
  /**
@@ -313,9 +322,4 @@ export default class LightningCheckboxGroup extends LightningElement {
313
322
  })
314
323
  .toString();
315
324
  }
316
-
317
- computearaiDescriedBy() {
318
- const helpMessage = this.template.querySelector('[data-helptext]');
319
- return getRealDOMId(helpMessage);
320
- }
321
325
  }
@@ -118,9 +118,11 @@ We recommend using the HTML `<select>` element on mobile instead.
118
118
 
119
119
  You must provide a text label for accessibility to make the information
120
120
  available to assistive technology. The `label` attribute creates an HTML label
121
- element for your input component. To hide a label from view and make it
121
+ element for your component. To hide a label from view and make it
122
122
  available to assistive technology, use the `label-hidden` variant.
123
123
 
124
+ This component uses `button` elements for select-only comboboxes to comply with the [Lightning Design System combobox blueprint](https://www.lightningdesignsystem.com/components/combobox/#%22Input%22-markup).
125
+
124
126
  #### Custom Events
125
127
 
126
128
  **`change`**
@@ -300,7 +300,6 @@ export default class LightningCombobox extends LightningElement {
300
300
  /**
301
301
  * Represents the validity states that an element can be in, with respect to constraint validation.
302
302
  * @type {object}
303
- * @required
304
303
  */
305
304
  @api
306
305
  get validity() {
@@ -1,7 +1,5 @@
1
1
  The `lightning/confirm` module lets you create a confirm modal within your component. Use `LightningConfirm` on your component to ask the user to respond before they continue.
2
2
 
3
- `lightning/confirm` is not supported on mobile devices.
4
-
5
3
  Use `LightningConfirm.open()` instead of the native `window.confirm()` for a more consistent user experience. They have similar functions, but `LightningConfirm.open()` works in cross-origin iframes, where the `.confirm()` method is no longer supported in Chrome and Safari. Unlike `window.confirm()`, `LightningConfirm.open()` doesn't halt execution on the page, it returns a Promise. Use `async`/`await` or `.then()` for any code you want to execute after the confirm has closed.
6
4
 
7
5
  Import `LightningConfirm` from the `lightning/confirm` module in the component that will launch the confirm modal, and call `LightningConfirm.open()` with your desired attributes.
@@ -30,6 +30,7 @@ include:
30
30
 
31
31
  - Displaying and formatting of columns with appropriate data types
32
32
  - Infinite scrolling of rows
33
+ - Virtualized rendering
33
34
  - Inline editing for some data types
34
35
  - Header actions
35
36
  - Row-level actions
@@ -606,6 +607,50 @@ the `totalNumberOfRows` attribute during initialization.
606
607
  SELECT COUNT(Id) FROM Contact
607
608
  ```
608
609
 
610
+ #### Virtualize Rendering
611
+
612
+ A virtualized datatable only renders the rows that are visible and a buffer of a few rows above and below them. This makes scrolling a lot smoother for datatables with more than 200 rows. This example shows how to enable virtualization for a datatable.
613
+
614
+ In the JavaScript file of your component, create a `renderConfig` object with the attribute `virtualize` set to `vertical`.
615
+
616
+ ```
617
+ import { LightningElement } from 'lwc';
618
+
619
+ export default class DataTable extends LightningElement {
620
+ // set data
621
+ // set columns
622
+ renderConfig = {
623
+ virtualize: 'vertical',
624
+ // additional customization
625
+ };
626
+ }
627
+ ```
628
+
629
+ In your `lightning-datatable` component file, set the `render-config` attribute to the `renderConfig` object you created. Set the component’s `render-mode` attribute to `role-based` and set the `lightning-datatable` component’s parent container to an explicit height. This can be a pixel value, a percentage, or an inherited height.
630
+
631
+ ```
632
+ <template>
633
+ <div style="height: 300px;">
634
+ <lightning-datatable
635
+ key-field="id"
636
+ data={data}
637
+ columns={columns}
638
+ render-mode="role-based"
639
+ render-config={renderConfig}>
640
+ </lightning-datatable>
641
+ </div>
642
+ </template>
643
+ ```
644
+
645
+ The `render-config` attribute supports these properties.
646
+ Property|Type|Default Value|Description
647
+ -----|-----|-----|-----
648
+ `bufferSize`|Number|`5`|Sets the number of additional rows that the component renders before and after the rows displayed in the viewport.
649
+ `fixedHeight`|Boolean|`false`|Makes every row the same height to reduce the load time that's spent caching the height of each row separately. If column wrapping is also enabled, rows can be positioned improperly.
650
+ `rowHeight`|Number|`30.5`|Height in pixels of a table row with one line of text.
651
+ `virtualize`|String|Empty string|Enables virtualization when set to `vertical`.
652
+
653
+
609
654
  #### Creating Header Actions
610
655
 
611
656
  Header actions refer to tasks you can perform on a column of data, such
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <div style="height:160px">
3
3
  <lightning-datatable
4
+ data-render-mode="default"
4
5
  key-field="id"
5
6
  columns={columns}
6
7
  data={data}
@@ -11,6 +12,20 @@
11
12
  is-loading={loading}>
12
13
  </lightning-datatable>
13
14
  </div>
15
+ <div style="height:160px">
16
+ <lightning-datatable
17
+ data-render-mode="role-based"
18
+ key-field="id"
19
+ columns={columns}
20
+ data={data}
21
+ default-sort-direction={defaultSortDirection}
22
+ sorted-direction={sortDirection}
23
+ sorted-by={sortedBy}
24
+ onsort={onHandleSort}
25
+ is-loading={loading}
26
+ render-mode="role-based">
27
+ </lightning-datatable>
28
+ </div>
14
29
 
15
30
  <lightning-button label="Enable Loading State" onclick={handleLoadingClick}></lightning-button>
16
31
  <lightning-button label="Add More Rows" onclick={handleMoreRowsClick}></lightning-button>