Skip to content

Commit fc88506

Browse files
fix: #8343, PanelMenu: Up and down arrow key navigation not working with dropdown items in PanelMenu (#8344)
* fix: #8343, PanelMenu: Up and down arrow key navigation not working with dropdown items in PanelMenu * fix: #8343, PanelMenu: Up and down arrow key navigation not working with dropdown items in PanelMenu * fix: #8343, PanelMenu: Up and down arrow key navigation not working with dropdown items in PanelMenu --------- Co-authored-by: Akshay Antony <akshayantony55@gmail.com>
1 parent b7a9325 commit fc88506

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

components/lib/panelmenu/PanelMenuList.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ export const PanelMenuList = React.memo((props) => {
4848

4949
const onFocus = (event) => {
5050
setFocused(true);
51+
52+
if (ObjectUtils.isEmpty(focusedItem)) {
53+
setTimeout(() => {
54+
const firstItem = findFirstItem();
55+
56+
if (firstItem) {
57+
setFocusedItem(firstItem);
58+
}
59+
}, 0);
60+
}
5161
};
5262

5363
const onBlur = () => {

0 commit comments

Comments
 (0)