@terraware/web-components 2.12.7 → 2.12.8

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.
@@ -66,7 +66,7 @@ function SelectT(props) {
66
66
  var hasOptions = (0, _react.useMemo)(function () {
67
67
  return options !== undefined && options.length > 0;
68
68
  }, [options]);
69
- var repositionMenu = (0, _react.useCallback)(function () {
69
+ var repositionMenu = (0, _react.useCallback)(function (checkHeight) {
70
70
  if (openedOptions && hasOptions) {
71
71
  scrollToSelectedElement();
72
72
  if (fixedMenu && inputRef.current && dropdownRef.current) {
@@ -75,7 +75,7 @@ function SelectT(props) {
75
75
  dropdownRef.current.style.top = "".concat(bbox.top + bbox.height, "px");
76
76
  var dropdownBottom = dropdownRef.current.clientHeight + bbox.top + bbox.height;
77
77
  var windowHeightThreshold = window.innerHeight - bbox.height;
78
- if (dropdownBottom > windowHeightThreshold) {
78
+ if (checkHeight && dropdownBottom > windowHeightThreshold) {
79
79
  dropdownRef.current.style.maxHeight = "".concat(dropdownRef.current.clientHeight - (dropdownBottom - windowHeightThreshold), "px");
80
80
  }
81
81
  setFixedMenuPositioned(true);
@@ -85,7 +85,7 @@ function SelectT(props) {
85
85
  }
86
86
  }, [fixedMenu, openedOptions, hasOptions]);
87
87
  (0, _react.useEffect)(function () {
88
- repositionMenu();
88
+ repositionMenu(true);
89
89
  }, [repositionMenu]);
90
90
  (0, _react.useEffect)(function () {
91
91
  var newIndex = -1;
@@ -103,7 +103,7 @@ function SelectT(props) {
103
103
  }
104
104
  }, [options, selectedValue, selectedIndex, isEqual]);
105
105
  var handleScroll = (0, _react.useCallback)(function () {
106
- repositionMenu();
106
+ repositionMenu(false);
107
107
  }, [repositionMenu]);
108
108
  var handleClick = (0, _react.useCallback)(function (event) {
109
109
  // Don't respond to user clicks inside the input box because those are
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terraware/web-components",
3
- "version": "2.12.7",
3
+ "version": "2.12.8",
4
4
  "author": "Terraformation Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {