Skip to content

Build your personal knowledge base with Trilium Notes

style/note attachments: make the list scrollable again

Adorian Doranfe38689a26de
diff --git a/apps/client/src/widgets/type_widgets/Attachment.tsx b/apps/client/src/widgets/type_widgets/Attachment.tsx
index bef480c6f5..b936779afc 100644
--- a/apps/client/src/widgets/type_widgets/Attachment.tsx
+++ b/apps/client/src/widgets/type_widgets/Attachment.tsx
@@ -34,20 +34,23 @@ import FNote from "../../entities/fnote";
export function AttachmentList({ note }: TypeWidgetProps) {
const attachments = useAttachments(note);
+ // TODO: Extract inline styles to CSS
return (
- <>
+ <div style={{display: "flex", flexDirection: "column", height: "100%"}}>
<AttachmentListHeader noteId={note.noteId} />
-
- <div className="attachment-list-wrapper">
- {attachments.length ? (
- attachments.map(attachment => <AttachmentInfo key={attachment.attachmentId} attachment={attachment} />)
- ) : (
- <Alert type="info">
- {t("attachment_list.no_attachments")}
- </Alert>
- )}
+ <div style={{overflow: "auto", flexGrow: 1}}>
+
+ <div className="attachment-list-wrapper">
+ {attachments.length ? (
+ attachments.map(attachment => <AttachmentInfo key={attachment.attachmentId} attachment={attachment} />)
+ ) : (
+ <Alert type="info">
+ {t("attachment_list.no_attachments")}
+ </Alert>
+ )}
+ </div>
</div>
- </>
+ </div>
);
}