@homebound/beam 3.55.0 → 3.55.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
@@ -12527,9 +12527,16 @@ function ListBox(props) {
12527
12527
  const firstRender = (0, import_react50.useRef)(true);
12528
12528
  const virtuosoListHeight = (0, import_react50.useRef)(0);
12529
12529
  const onListHeightChange = (listHeight) => {
12530
+ const prevListHeight = virtuosoListHeight.current;
12530
12531
  virtuosoListHeight.current = listHeight;
12531
12532
  const height = (selectedList.current?.offsetHeight || 0) + listHeight;
12532
- setPopoverHeight(Math.min(popoverMaxHeight, hasSections ? height + persistentItemHeight + sectionSeparatorHeight : height));
12533
+ const next = Math.min(popoverMaxHeight, hasSections ? height + persistentItemHeight + sectionSeparatorHeight : height);
12534
+ setPopoverHeight((prev) => {
12535
+ if (prevListHeight > 0 && listHeight < prevListHeight && next < prev) {
12536
+ return prev;
12537
+ }
12538
+ return next;
12539
+ });
12533
12540
  };
12534
12541
  (0, import_react50.useEffect)(
12535
12542
  () => {