@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.js CHANGED
@@ -12061,9 +12061,16 @@ function ListBox(props) {
12061
12061
  const firstRender = useRef22(true);
12062
12062
  const virtuosoListHeight = useRef22(0);
12063
12063
  const onListHeightChange = (listHeight) => {
12064
+ const prevListHeight = virtuosoListHeight.current;
12064
12065
  virtuosoListHeight.current = listHeight;
12065
12066
  const height = (selectedList.current?.offsetHeight || 0) + listHeight;
12066
- setPopoverHeight(Math.min(popoverMaxHeight, hasSections ? height + persistentItemHeight + sectionSeparatorHeight : height));
12067
+ const next = Math.min(popoverMaxHeight, hasSections ? height + persistentItemHeight + sectionSeparatorHeight : height);
12068
+ setPopoverHeight((prev) => {
12069
+ if (prevListHeight > 0 && listHeight < prevListHeight && next < prev) {
12070
+ return prev;
12071
+ }
12072
+ return next;
12073
+ });
12067
12074
  };
12068
12075
  useEffect12(
12069
12076
  () => {