@momentum-design/components 0.129.18 → 0.129.20
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/dist/browser/index.js +204 -204
- package/dist/browser/index.js.map +4 -4
- package/dist/components/formfieldwrapper/formfieldwrapper.component.d.ts +5 -0
- package/dist/components/formfieldwrapper/formfieldwrapper.component.js +5 -0
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.d.ts +1 -1
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.js +3 -2
- package/dist/components/select/select.component.d.ts +2 -2
- package/dist/components/select/select.component.js +2 -2
- package/dist/components/virtualizedlist/virtualizedlist.component.d.ts +17 -4
- package/dist/components/virtualizedlist/virtualizedlist.component.js +17 -4
- package/dist/custom-elements.json +98 -10
- package/dist/react/select/index.d.ts +2 -2
- package/dist/react/select/index.js +2 -2
- package/dist/react/virtualizedlist/index.d.ts +17 -4
- package/dist/react/virtualizedlist/index.js +17 -4
- package/package.json +1 -1
|
@@ -12,10 +12,10 @@ import type { Events } from '../../components/virtualizedlist/virtualizedlist.ty
|
|
|
12
12
|
*
|
|
13
13
|
* ## Setup
|
|
14
14
|
*
|
|
15
|
-
* `virtualizerProps` is a required prop that requires at least
|
|
16
|
-
* `count` is the total number of items in the list
|
|
17
|
-
* size (in pixels) of each item in the list
|
|
18
|
-
*
|
|
15
|
+
* `virtualizerProps` is a required prop that requires at least three properties to be set:
|
|
16
|
+
* - `count` is the total number of items in the list
|
|
17
|
+
* - `estimateSize` is a function that returns the estimated size (in pixels) of each item in the list
|
|
18
|
+
* - `getItemKey` is a function that returns a unique key for each item in the list.
|
|
19
19
|
*
|
|
20
20
|
* ### Render list items
|
|
21
21
|
*
|
|
@@ -44,6 +44,19 @@ import type { Events } from '../../components/virtualizedlist/virtualizedlist.ty
|
|
|
44
44
|
* Unique keys for the list items are critical for dynamically changing list items or item's content.
|
|
45
45
|
* If the key change with the content it will cause scrollbar and content shuttering.
|
|
46
46
|
*
|
|
47
|
+
* ### Top/Bottom Padding
|
|
48
|
+
*
|
|
49
|
+
* If padding is required at the top or the bottom of the list, do not apply padding/margin via CSS since this
|
|
50
|
+
* will break the virtualization calculations and can cause scrollbars when they are not necessary.
|
|
51
|
+
* Instead use the `paddingStart` and `paddingEnd` properties (in pixels) of the `virtualizerProps` prop.
|
|
52
|
+
*
|
|
53
|
+
* ### Gaps between items
|
|
54
|
+
*
|
|
55
|
+
* If you are adding gaps between items using CSS margin or gap properties, you must provide the same value in pixels
|
|
56
|
+
* to the `gap` property of the `virtualizerProps` prop. This ensures that the virtualization calculations are accurate.
|
|
57
|
+
* If you are using CSS margins, ensure that you are not applying the margin to the top of the first or the bottom of the last item.
|
|
58
|
+
* If you need spacing there, use the `paddingStart` and `paddingEnd` properties of the `virtualizerProps` prop.
|
|
59
|
+
*
|
|
47
60
|
* @tagname mdc-virtualizedlist
|
|
48
61
|
*
|
|
49
62
|
* @event scroll - (React: onScroll) Event that gets called when user scrolls inside of list.
|
|
@@ -13,10 +13,10 @@ import { TAG_NAME } from '../../components/virtualizedlist/virtualizedlist.const
|
|
|
13
13
|
*
|
|
14
14
|
* ## Setup
|
|
15
15
|
*
|
|
16
|
-
* `virtualizerProps` is a required prop that requires at least
|
|
17
|
-
* `count` is the total number of items in the list
|
|
18
|
-
* size (in pixels) of each item in the list
|
|
19
|
-
*
|
|
16
|
+
* `virtualizerProps` is a required prop that requires at least three properties to be set:
|
|
17
|
+
* - `count` is the total number of items in the list
|
|
18
|
+
* - `estimateSize` is a function that returns the estimated size (in pixels) of each item in the list
|
|
19
|
+
* - `getItemKey` is a function that returns a unique key for each item in the list.
|
|
20
20
|
*
|
|
21
21
|
* ### Render list items
|
|
22
22
|
*
|
|
@@ -45,6 +45,19 @@ import { TAG_NAME } from '../../components/virtualizedlist/virtualizedlist.const
|
|
|
45
45
|
* Unique keys for the list items are critical for dynamically changing list items or item's content.
|
|
46
46
|
* If the key change with the content it will cause scrollbar and content shuttering.
|
|
47
47
|
*
|
|
48
|
+
* ### Top/Bottom Padding
|
|
49
|
+
*
|
|
50
|
+
* If padding is required at the top or the bottom of the list, do not apply padding/margin via CSS since this
|
|
51
|
+
* will break the virtualization calculations and can cause scrollbars when they are not necessary.
|
|
52
|
+
* Instead use the `paddingStart` and `paddingEnd` properties (in pixels) of the `virtualizerProps` prop.
|
|
53
|
+
*
|
|
54
|
+
* ### Gaps between items
|
|
55
|
+
*
|
|
56
|
+
* If you are adding gaps between items using CSS margin or gap properties, you must provide the same value in pixels
|
|
57
|
+
* to the `gap` property of the `virtualizerProps` prop. This ensures that the virtualization calculations are accurate.
|
|
58
|
+
* If you are using CSS margins, ensure that you are not applying the margin to the top of the first or the bottom of the last item.
|
|
59
|
+
* If you need spacing there, use the `paddingStart` and `paddingEnd` properties of the `virtualizerProps` prop.
|
|
60
|
+
*
|
|
48
61
|
* @tagname mdc-virtualizedlist
|
|
49
62
|
*
|
|
50
63
|
* @event scroll - (React: onScroll) Event that gets called when user scrolls inside of list.
|