Focus request/folder after creation

This commit is contained in:
Gregory Schier
2025-11-11 14:11:43 -08:00
parent 8164a61376
commit 7b6278405c
19 changed files with 138 additions and 86 deletions

View File

@@ -11,8 +11,8 @@ export async function createRequestAndNavigate<
if (patch.sortPriority === undefined) {
if (activeRequest != null) {
// Place above currently active request
patch.sortPriority = activeRequest.sortPriority - 0.0001;
// Place below the currently active request
patch.sortPriority = activeRequest.sortPriority;
} else {
// Place at the very top
patch.sortPriority = -Date.now();
@@ -27,4 +27,5 @@ export async function createRequestAndNavigate<
params: { workspaceId: patch.workspaceId },
search: (prev) => ({ ...prev, request_id: newId }),
});
return newId;
}