From abf1f6c041285797c2f994c06af7cd28d00ce954 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 10 Aug 2025 20:24:20 +0300 Subject: [PATCH] fix(react/dialogs): revision list not full height --- apps/client/src/widgets/dialogs/revisions.tsx | 2 +- apps/client/src/widgets/react/FormList.tsx | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/apps/client/src/widgets/dialogs/revisions.tsx b/apps/client/src/widgets/dialogs/revisions.tsx index 5b774ce30..f5e0b203d 100644 --- a/apps/client/src/widgets/dialogs/revisions.tsx +++ b/apps/client/src/widgets/dialogs/revisions.tsx @@ -107,7 +107,7 @@ function RevisionsDialogComponent() { function RevisionsList({ revisions, onSelect, currentRevision }: { revisions: RevisionItem[], onSelect: (val: string) => void, currentRevision?: RevisionItem }) { return ( - + {revisions.map((item) => void; style?: CSSProperties; + fullHeight?: boolean; } -export default function FormList({ children, onSelect, style }: FormListOpts) { +export default function FormList({ children, onSelect, style, fullHeight }: FormListOpts) { const wrapperRef = useRef(null); const triggerRef = useRef(null); @@ -28,9 +29,17 @@ export default function FormList({ children, onSelect, style }: FormListOpts) { } }, [ triggerRef, wrapperRef ]); + const builtinStyles = useMemo(() => { + const style: CSSProperties = {}; + if (fullHeight) { + style.height = "100%"; + } + return style; + }, [ fullHeight ]); + return ( -
-
+
+