fix(defineShortcuts): handle extract when using onSelect or onClick (#2896)

This commit is contained in:
Dominique BILLET
2024-12-14 19:12:32 +01:00
committed by GitHub
parent babfcdcb02
commit 2e17fb68de

View File

@@ -41,7 +41,7 @@ export function extractShortcuts(items: any[] | any[][]) {
function traverse(items: any[]) {
items.forEach((item) => {
if (item.kbds?.length && (item.select || item.click)) {
if (item.kbds?.length && (item.onSelect || item.onClick)) {
const shortcutKey = item.kbds.join('_')
shortcuts[shortcutKey] = item.onSelect || item.onClick
}