mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	fix(react/dialogs): add back selection in revisions list
This commit is contained in:
		| @@ -83,6 +83,7 @@ function RevisionsDialogComponent() { | ||||
|                             setCurrentRevision(correspondingRevision); | ||||
|                         } | ||||
|                     }} | ||||
|                     currentRevision={currentRevision} | ||||
|                 /> | ||||
|  | ||||
|                 <div className="revision-content-wrapper" style={{ | ||||
| @@ -104,13 +105,14 @@ function RevisionsDialogComponent() { | ||||
|     ) | ||||
| } | ||||
|  | ||||
| function RevisionsList({ revisions, onSelect }: { revisions: RevisionItem[], onSelect: (val: string) => void }) { | ||||
| function RevisionsList({ revisions, onSelect, currentRevision }: { revisions: RevisionItem[], onSelect: (val: string) => void, currentRevision?: RevisionItem }) { | ||||
|     return ( | ||||
|         <FormList style={{ height: "100%", flexShrink: 0 }} onSelect={onSelect}> | ||||
|             {revisions.map((item) =>  | ||||
|                 <FormListItem | ||||
|                     title={t("revisions.revision_last_edited", { date: item.dateLastEdited })} | ||||
|                     value={item.revisionId} | ||||
|                     active={currentRevision && item.revisionId === currentRevision.revisionId} | ||||
|                 > | ||||
|                     {item.dateLastEdited && item.dateLastEdited.substr(0, 16)} ({item.contentLength && utils.formatSize(item.contentLength)}) | ||||
|                 </FormListItem> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user