mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 19:16:55 +02:00
Add tree rename (on Enter) and global rename hotkeys (#279)
This commit is contained in:
@@ -413,7 +413,7 @@ const Menu = forwardRef<Omit<DropdownRef, 'open' | 'isOpen' | 'toggle' | 'items'
|
||||
close: handleClose,
|
||||
prev: handlePrev,
|
||||
next: handleNext,
|
||||
async select() {
|
||||
select: async () => {
|
||||
const item = items[selectedIndexRef.current ?? -1] ?? null;
|
||||
if (!item) return;
|
||||
await handleSelect(item);
|
||||
@@ -569,10 +569,7 @@ const Menu = forwardRef<Omit<DropdownRef, 'open' | 'isOpen' | 'toggle' | 'items'
|
||||
<div
|
||||
key={i}
|
||||
className={classNames('my-1 mx-2 max-w-xs')}
|
||||
onClick={() => {
|
||||
// Ensure the dropdown is closed when anything in the content is clicked
|
||||
onClose();
|
||||
}}
|
||||
onClick={onClose}
|
||||
>
|
||||
{item.label}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user