diff --git a/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js b/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js index 562fc319f..3089de25e 100644 --- a/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js +++ b/packages/bruno-app/src/components/RequestTabs/RequestTab/index.js @@ -224,6 +224,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(); @@ -291,6 +313,13 @@ function RequestTabMenu({ onDropdownCreate, collectionRequestTabs, tabIndex, col > Clone Request +