@sledge-app/react-instant-search 2.0.11 → 2.0.12

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.
@@ -1220,7 +1220,10 @@ const Select = ({ name, placeholder, required, defaultValue, items: itemsProp, l
1220
1220
  onValueChange,
1221
1221
  onOpenChange: (open) => {
1222
1222
  handleClassNameRoot(open);
1223
- setItems(open ? itemsProp : []);
1223
+ setItems(open && (itemsProp == null ? void 0 : itemsProp.length) ? [itemsProp == null ? void 0 : itemsProp[0]] : []);
1224
+ setTimeout(() => {
1225
+ setItems(open && (itemsProp == null ? void 0 : itemsProp.length) ? itemsProp : []);
1226
+ }, 0);
1224
1227
  },
1225
1228
  ...defaultValue ? {
1226
1229
  defaultValue
@@ -1257,7 +1260,7 @@ const Select = ({ name, placeholder, required, defaultValue, items: itemsProp, l
1257
1260
  ) })
1258
1261
  }
1259
1262
  ),
1260
- /* @__PURE__ */ jsxRuntimeExports.jsx($cc7e05a45900e73f$export$d5c6c08dc2d3ca7, { className: "sledge__select-viewport", ref: selectViewportRef, children: useVirtualized ? /* @__PURE__ */ jsxRuntimeExports.jsx(
1263
+ /* @__PURE__ */ jsxRuntimeExports.jsx($cc7e05a45900e73f$export$d5c6c08dc2d3ca7, { className: "sledge__select-viewport", ref: selectViewportRef, children: useVirtualized && (items == null ? void 0 : items.length) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
1261
1264
  VirtualizedList,
1262
1265
  {
1263
1266
  rowCount: items == null ? void 0 : items.length,