mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 19:16:55 +02:00
Focus request/folder after creation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user