@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 CHANGED
@@ -11107,6 +11107,7 @@ function VirtualizedOptions(props) {
11107
11107
  // eslint-disable-next-line react-hooks/exhaustive-deps
11108
11108
  [focusedItem]
11109
11109
  );
11110
+ const key = process.env.NODE_ENV === "test" ? items.length : "virtuoso";
11110
11111
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11111
11112
  import_react_virtuoso.Virtuoso,
11112
11113
  {
@@ -11114,11 +11115,6 @@ function VirtualizedOptions(props) {
11114
11115
  totalListHeightChanged: onListHeightChange,
11115
11116
  totalCount: items.length,
11116
11117
  ...process.env.NODE_ENV === "test" ? {
11117
- // In tests, we render all rows so assertions can see expands/async-loaded items. However,
11118
- // the `initialItemCount` (next prop) is only applied on amount, so we set `key={items.length}`
11119
- // to force a remount when our list changes -- and we only want/need this in tests, b/c otherwise
11120
- // in production a Virtuoso remount causes visible flashing.
11121
- key: items.length,
11122
11118
  // We don't really need to set this, but it's handy for tests, which would otherwise render
11123
11119
  // just 1 row. A better way to do this would be to jest.mock out Virtuoso with an impl that
11124
11120
  // just rendered everything, but doing this for now.
@@ -11161,7 +11157,8 @@ function VirtualizedOptions(props) {
11161
11157
  components: !loading ? {} : {
11162
11158
  Footer: typeof loading === "function" ? loading : () => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(LoadingDots, { contrast })
11163
11159
  }
11164
- }
11160
+ },
11161
+ key
11165
11162
  );
11166
11163
  }
11167
11164