feat: 💄 move document select and pagination outside of scroll container

This commit is contained in:
RaviAnand Mohabir 2025-04-08 19:04:00 +02:00
parent c7b299624e
commit 031ac2bacf

View File

@ -521,12 +521,10 @@ function Organizrr() {
<AppShell.Aside p="md" bg="var(--mantine-primary-color-0)"> <AppShell.Aside p="md" bg="var(--mantine-primary-color-0)">
<AppShell.Section> <AppShell.Section>
<Stack>
<Group style={{ alignSelf: "start" }}> <Group style={{ alignSelf: "start" }}>
<IconEye /> <Title order={3}>Preview</Title> <IconEye /> <Title order={3}>Preview</Title>
</Group> </Group>
</AppShell.Section>
<AppShell.Section grow my="md" component={ScrollArea}>
<Stack align="center">
<Select <Select
label="Select file" label="Select file"
data={form.values.documents.map(({ id, file }) => ({ data={form.values.documents.map(({ id, file }) => ({
@ -536,6 +534,10 @@ function Organizrr() {
value={activeDocumentId} value={activeDocumentId}
onChange={setActiveDocumentId} onChange={setActiveDocumentId}
/> />
</Stack>
</AppShell.Section>
<AppShell.Section grow my="md" component={ScrollArea}>
<Stack align="center">
{activeDocument && {activeDocument &&
activeDocument.file.name.toLowerCase().endsWith(".pdf") && ( activeDocument.file.name.toLowerCase().endsWith(".pdf") && (
<> <>
@ -547,14 +549,20 @@ function Organizrr() {
<Page pageNumber={pageNumber} scale={0.8} /> <Page pageNumber={pageNumber} scale={0.8} />
</Document> </Document>
</ScrollArea> </ScrollArea>
</>
)}
</Stack>
</AppShell.Section>
<AppShell.Section>
{activeDocument && (
<Stack align="center">
<Pagination <Pagination
value={pageNumber} value={pageNumber}
onChange={setPageNumber} onChange={setPageNumber}
total={numPages ?? 0} total={numPages ?? 0}
/> />
</>
)}
</Stack> </Stack>
)}
</AppShell.Section> </AppShell.Section>
</AppShell.Aside> </AppShell.Aside>