mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
fix(defineShortcuts): handle extract when using onSelect or onClick (#2896)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user