Skip to content

Commit 3669151

Browse files
committed
Confirm deleting notebook
1 parent d086687 commit 3669151

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/app.jsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,10 +1769,19 @@ class App extends Component {
17691769
tooltip='Delete notebook'
17701770
tooltipOptions={ttopts}
17711771
onClick={() => {
1772-
this.patchLectureDetails({
1773-
removeipynb: {
1774-
id: node.id
1775-
}
1772+
confirmDialog({
1773+
message:
1774+
'Do you really want to delete this notebook permanently? (Can not be undone!)',
1775+
header: 'Confirm deletion',
1776+
icon: 'pi pi-exclamation-triangle',
1777+
accept: () => {
1778+
this.patchLectureDetails({
1779+
removeipynb: {
1780+
id: node.id
1781+
}
1782+
})
1783+
},
1784+
reject: () => {} // do nothing
17761785
})
17771786
}}
17781787
/>

0 commit comments

Comments
 (0)