diff --git a/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js b/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js index aeacc6f6b..9a42c885f 100644 --- a/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js +++ b/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js @@ -251,6 +251,28 @@ function RequestTabMenu({ onDropdownCreate, collectionRequestTabs, tabIndex, col } catch (err) {} } + + function handleRevertChanges(event) { + event.stopPropagation(); + dropdownTippyRef.current.hide(); + + if (!currentTabUid) { + return; + } + + try { + const item = findItemInCollection(collection, currentTabUid); + if (item.draft) { + dispatch( + deleteRequestDraft({ + itemUid: item.uid, + collectionUid: collection.uid + }) + ); + } + } catch (err) {} + } + function handleCloseOtherTabs(event) { dropdownTippyRef.current.hide(); @@ -318,6 +340,13 @@ function RequestTabMenu({ onDropdownCreate, collectionRequestTabs, tabIndex, col > Clone Request +