mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-29 11:20:36 +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[]) {
|
function traverse(items: any[]) {
|
||||||
items.forEach((item) => {
|
items.forEach((item) => {
|
||||||
if (item.kbds?.length && (item.select || item.click)) {
|
if (item.kbds?.length && (item.onSelect || item.onClick)) {
|
||||||
const shortcutKey = item.kbds.join('_')
|
const shortcutKey = item.kbds.join('_')
|
||||||
shortcuts[shortcutKey] = item.onSelect || item.onClick
|
shortcuts[shortcutKey] = item.onSelect || item.onClick
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user