@carbon-labs/react-ui-shell 0.23.0 → 0.24.0
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/es/components/SideNav.js
CHANGED
|
@@ -144,12 +144,16 @@ function SideNavRenderFunction(_ref, ref) {
|
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
resetNodeTabIndices();
|
|
147
|
+
}
|
|
148
|
+
}, [prefix, internalIsTreeview]);
|
|
149
|
+
useEffect(() => {
|
|
150
|
+
if (sideNavRef.current) {
|
|
147
151
|
const firstElement = sideNavRef?.current?.querySelector('a, button');
|
|
148
|
-
if (firstElement) {
|
|
152
|
+
if (firstElement && (navType == SIDE_NAV_TYPE.PANEL || expanded)) {
|
|
149
153
|
firstElement.tabIndex = 0;
|
|
150
154
|
}
|
|
151
155
|
}
|
|
152
|
-
}, [
|
|
156
|
+
}, [expanded]);
|
|
153
157
|
|
|
154
158
|
/**
|
|
155
159
|
* Returns the parent SideNavMenu, if node is actually inside one.
|
|
@@ -146,12 +146,16 @@ function SideNavRenderFunction(_ref, ref) {
|
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
148
|
resetNodeTabIndices();
|
|
149
|
+
}
|
|
150
|
+
}, [prefix, internalIsTreeview]);
|
|
151
|
+
React.useEffect(() => {
|
|
152
|
+
if (sideNavRef.current) {
|
|
149
153
|
const firstElement = sideNavRef?.current?.querySelector('a, button');
|
|
150
|
-
if (firstElement) {
|
|
154
|
+
if (firstElement && (navType == SIDE_NAV_TYPE.PANEL || expanded)) {
|
|
151
155
|
firstElement.tabIndex = 0;
|
|
152
156
|
}
|
|
153
157
|
}
|
|
154
|
-
}, [
|
|
158
|
+
}, [expanded]);
|
|
155
159
|
|
|
156
160
|
/**
|
|
157
161
|
* Returns the parent SideNavMenu, if node is actually inside one.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon-labs/react-ui-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ibm/telemetry-js": "^1.9.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "943c8b8a3670e86c92caf65853e204b279e1d318"
|
|
37
37
|
}
|