mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	fix(react/dialogs): delete notes not properly reporting state
This commit is contained in:
		
							parent
							
								
									5cd7e4707a
								
							
						
					
					
						commit
						b25e9cdee6
					
				| @ -58,7 +58,7 @@ function DeleteNotesDialogComponent() { | ||||
|             setBrokenRelations(response.brokenRelations); | ||||
|             setNoteIdsToBeDeleted(response.noteIdsToBeDeleted); | ||||
|         }); | ||||
|     }, [ opts ]); | ||||
|     }, [ opts, deleteAllClones ]); | ||||
| 
 | ||||
|     return ( | ||||
|         <Modal | ||||
| @ -113,6 +113,7 @@ function DeletedNotes({ noteIdsToBeDeleted }: { noteIdsToBeDeleted: DeleteNotesP | ||||
|         }); | ||||
|     }, [noteIdsToBeDeleted]); | ||||
| 
 | ||||
|     if (noteIdsToBeDeleted.length) { | ||||
|         return ( | ||||
|             <div className="delete-notes-list-wrapper"> | ||||
|                 <h4>{t("delete_notes.notes_to_be_deleted", { notesCount: noteIdsToBeDeleted.length })}</h4> | ||||
| @ -124,6 +125,13 @@ function DeletedNotes({ noteIdsToBeDeleted }: { noteIdsToBeDeleted: DeleteNotesP | ||||
|                 </ul> | ||||
|             </div> | ||||
|         ); | ||||
|     } else { | ||||
|         return ( | ||||
|             <Alert type="info"> | ||||
|                 {t("delete_notes.no_note_to_delete")} | ||||
|             </Alert> | ||||
|         ) | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| function BrokenRelations({ brokenRelations }: { brokenRelations: DeleteNotesPreview["brokenRelations"] }) { | ||||
| @ -161,11 +169,7 @@ function BrokenRelations({ brokenRelations }: { brokenRelations: DeleteNotesPrev | ||||
|             </Alert> | ||||
|         ); | ||||
|     } else { | ||||
|         return ( | ||||
|             <Alert type="info"> | ||||
|                 {t("delete_notes.no_note_to_delete")} | ||||
|             </Alert> | ||||
|         ); | ||||
|         return <></>; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran