carbon-react 144.9.5 → 144.9.6

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.
@@ -88,6 +88,11 @@ const SelectList = /*#__PURE__*/React.forwardRef(({
88
88
  scrollPaddingEnd: actionButtonHeight.current,
89
89
  rangeExtractor
90
90
  });
91
+ useEffect(() => {
92
+ if (isOpen && currentOptionsListIndex > -1) {
93
+ virtualizer.scrollToIndex(currentOptionsListIndex, SCROLL_OPTIONS);
94
+ }
95
+ }, [currentOptionsListIndex, isOpen, virtualizer]);
91
96
  const items = virtualizer.getVirtualItems();
92
97
  const childrenList = useMemo(() => React.Children.toArray(children), [children]);
93
98
 
@@ -97,6 +97,11 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
97
97
  scrollPaddingEnd: actionButtonHeight.current,
98
98
  rangeExtractor
99
99
  });
100
+ (0, _react.useEffect)(() => {
101
+ if (isOpen && currentOptionsListIndex > -1) {
102
+ virtualizer.scrollToIndex(currentOptionsListIndex, SCROLL_OPTIONS);
103
+ }
104
+ }, [currentOptionsListIndex, isOpen, virtualizer]);
100
105
  const items = virtualizer.getVirtualItems();
101
106
  const childrenList = (0, _react.useMemo)(() => _react.default.Children.toArray(children), [children]);
102
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "144.9.5",
3
+ "version": "144.9.6",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",