setShowConfirmClose(false)}
onCloseWithoutSave={() => {
dispatch(deleteRequestDraft({
itemUid: item.uid,
collectionUid: collection.uid
}));
dispatch(closeTabs({
tabUids: [tab.uid]
}));
setShowConfirmClose(false);
}}
onSaveAndClose={() => {
// For examples, we don't have a separate save action
// The changes are saved automatically when the request is saved
dispatch(saveRequest(item.uid, collection.uid, true));
dispatch(closeTabs({
tabUids: [tab.uid]
}));
setShowConfirmClose(false);
}}
/>
)}
dispatch(makeTabPermanent({ uid: tab.uid }))}
onMouseDown={handleMouseDown}
onMouseUp={(e) => {
if (!hasChanges) return handleMouseUp(e);
if (e.button === 1) {
e.stopPropagation();
e.preventDefault();
setShowConfirmClose(true);
}
}}
>
{example.name}
{
if (!hasChanges) {
return handleCloseClick(e);
}
e.stopPropagation();
e.preventDefault();
setShowConfirmClose(true);
}}
/>