@homebound/beam 3.1.0 → 3.1.1
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/index.cjs +3 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10702,6 +10702,7 @@ function VirtualizedOptions(props) {
|
|
|
10702
10702
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10703
10703
|
[focusedItem]
|
|
10704
10704
|
);
|
|
10705
|
+
const key = process.env.NODE_ENV === "test" ? items.length : "virtuoso";
|
|
10705
10706
|
return /* @__PURE__ */ jsx50(
|
|
10706
10707
|
Virtuoso,
|
|
10707
10708
|
{
|
|
@@ -10709,11 +10710,6 @@ function VirtualizedOptions(props) {
|
|
|
10709
10710
|
totalListHeightChanged: onListHeightChange,
|
|
10710
10711
|
totalCount: items.length,
|
|
10711
10712
|
...process.env.NODE_ENV === "test" ? {
|
|
10712
|
-
// In tests, we render all rows so assertions can see expands/async-loaded items. However,
|
|
10713
|
-
// the `initialItemCount` (next prop) is only applied on amount, so we set `key={items.length}`
|
|
10714
|
-
// to force a remount when our list changes -- and we only want/need this in tests, b/c otherwise
|
|
10715
|
-
// in production a Virtuoso remount causes visible flashing.
|
|
10716
|
-
key: items.length,
|
|
10717
10713
|
// We don't really need to set this, but it's handy for tests, which would otherwise render
|
|
10718
10714
|
// just 1 row. A better way to do this would be to jest.mock out Virtuoso with an impl that
|
|
10719
10715
|
// just rendered everything, but doing this for now.
|
|
@@ -10756,7 +10752,8 @@ function VirtualizedOptions(props) {
|
|
|
10756
10752
|
components: !loading ? {} : {
|
|
10757
10753
|
Footer: typeof loading === "function" ? loading : () => /* @__PURE__ */ jsx50(LoadingDots, { contrast })
|
|
10758
10754
|
}
|
|
10759
|
-
}
|
|
10755
|
+
},
|
|
10756
|
+
key
|
|
10760
10757
|
);
|
|
10761
10758
|
}
|
|
10762
10759
|
|