Add tree rename (on Enter) and global rename hotkeys (#279)

This commit is contained in:
Gregory Schier
2025-10-24 08:01:38 -07:00
committed by GitHub
parent 43437abae7
commit 1198aa7d87
9 changed files with 218 additions and 93 deletions

View File

@@ -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>