refactor: consider request handles with tab saveContext resolution for collection move/reorder actions

This commit is contained in:
jamesgeorge007
2024-04-30 14:16:28 +05:30
parent 3a195711a4
commit fe3adeeb17
3 changed files with 63 additions and 39 deletions

View File

@@ -1708,6 +1708,17 @@ const dropRequest = async (payload: {
// If there is a tab attached to this request, update the document `inheritedProperties`
if (possibleTab) {
// @ts-expect-error - Updating the handle
possibleTab.value.document.saveContext.requestHandle.data = {
// @ts-expect-error - Updating the handle
...possibleTab.value.document.saveContext.requestHandle.data,
collectionID: destinationCollectionIndex,
requestID: `${destinationCollectionIndex}/${(
getRequestsByPath(restCollectionState.value, destinationCollectionIndex)
.length - 1
).toString()}`,
}
possibleTab.value.document.inheritedProperties = {
auth,
headers,