@carbon/ibm-products 2.42.1-canary.24 → 2.42.1-canary.26
Sign up to get free protection for your applications and to get access to all the features.
@@ -95,7 +95,8 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
95
95
|
var subtitleRef = useRef(null);
|
96
96
|
var previousState = usePreviousValue({
|
97
97
|
size: size,
|
98
|
-
open: open
|
98
|
+
open: open,
|
99
|
+
currentStep: currentStep
|
99
100
|
});
|
100
101
|
var _useState3 = useState(-1),
|
101
102
|
_useState4 = _slicedToArray(_useState3, 2),
|
@@ -162,9 +163,10 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
162
163
|
if (sidePanelRef && panelRefValue) {
|
163
164
|
var _animatedScrollRef$cu;
|
164
165
|
var scrollableSection = (_animatedScrollRef$cu = animatedScrollRef.current) !== null && _animatedScrollRef$cu !== void 0 ? _animatedScrollRef$cu : innerContentRef.current;
|
165
|
-
if (scrollableSection) {
|
166
|
+
if (previousState && previousState['currentStep'] !== currentStep && scrollableSection) {
|
166
167
|
scrollableSection.scrollTop = 0;
|
167
168
|
}
|
169
|
+
|
168
170
|
// The size of the panel has changed while it is still opened
|
169
171
|
// so we need to scroll it to the top and reset the header
|
170
172
|
// height css custom property
|
@@ -104,7 +104,8 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
104
104
|
var subtitleRef = React.useRef(null);
|
105
105
|
var previousState = usePreviousValue.usePreviousValue({
|
106
106
|
size: size,
|
107
|
-
open: open
|
107
|
+
open: open,
|
108
|
+
currentStep: currentStep
|
108
109
|
});
|
109
110
|
var _useState3 = React.useState(-1),
|
110
111
|
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
@@ -171,9 +172,10 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
171
172
|
if (sidePanelRef && panelRefValue) {
|
172
173
|
var _animatedScrollRef$cu;
|
173
174
|
var scrollableSection = (_animatedScrollRef$cu = animatedScrollRef.current) !== null && _animatedScrollRef$cu !== void 0 ? _animatedScrollRef$cu : innerContentRef.current;
|
174
|
-
if (scrollableSection) {
|
175
|
+
if (previousState && previousState['currentStep'] !== currentStep && scrollableSection) {
|
175
176
|
scrollableSection.scrollTop = 0;
|
176
177
|
}
|
178
|
+
|
177
179
|
// The size of the panel has changed while it is still opened
|
178
180
|
// so we need to scroll it to the top and reset the header
|
179
181
|
// height css custom property
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products",
|
3
3
|
"description": "Carbon for IBM Products",
|
4
|
-
"version": "2.42.1-canary.
|
4
|
+
"version": "2.42.1-canary.26+ee2897af4",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -121,5 +121,5 @@
|
|
121
121
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
122
122
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
123
123
|
},
|
124
|
-
"gitHead": "
|
124
|
+
"gitHead": "ee2897af4ca2e921bbfa915bb553f816f8b9a233"
|
125
125
|
}
|