mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
web: fix height of attachments table
This commit is contained in:
@@ -36,6 +36,7 @@ type VirtualizedTableProps<T, C> = {
|
||||
mode?: "fixed" | "dynamic";
|
||||
items: T[];
|
||||
estimatedSize: number;
|
||||
headerSize: number;
|
||||
getItemKey: (index: number) => string;
|
||||
scrollElement?: Element | null;
|
||||
context?: C;
|
||||
@@ -50,6 +51,7 @@ export function VirtualizedTable<T, C>(props: VirtualizedTableProps<T, C>) {
|
||||
getItemKey,
|
||||
scrollElement,
|
||||
scrollMargin,
|
||||
headerSize,
|
||||
renderRow: Row,
|
||||
estimatedSize,
|
||||
mode,
|
||||
@@ -76,7 +78,7 @@ export function VirtualizedTable<T, C>(props: VirtualizedTableProps<T, C>) {
|
||||
<Box
|
||||
ref={containerRef}
|
||||
sx={{
|
||||
height: virtualizer.getTotalSize()
|
||||
height: virtualizer.getTotalSize() + headerSize
|
||||
}}
|
||||
>
|
||||
<table style={style}>
|
||||
|
||||
@@ -317,6 +317,7 @@ function AttachmentsDialog({ onClose }: AttachmentsDialogProps) {
|
||||
}
|
||||
mode="fixed"
|
||||
estimatedSize={30}
|
||||
headerSize={40}
|
||||
getItemKey={(index) => attachments.key(index)}
|
||||
items={attachments.placeholders}
|
||||
context={{
|
||||
|
||||
Reference in New Issue
Block a user