feat: 💄 move document select and pagination outside of scroll container
This commit is contained in:
parent
c7b299624e
commit
031ac2bacf
@ -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>
|
||||||
<Group style={{ alignSelf: "start" }}>
|
<Stack>
|
||||||
<IconEye /> <Title order={3}>Preview</Title>
|
<Group style={{ alignSelf: "start" }}>
|
||||||
</Group>
|
<IconEye /> <Title order={3}>Preview</Title>
|
||||||
</AppShell.Section>
|
</Group>
|
||||||
<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,15 +549,21 @@ function Organizrr() {
|
|||||||
<Page pageNumber={pageNumber} scale={0.8} />
|
<Page pageNumber={pageNumber} scale={0.8} />
|
||||||
</Document>
|
</Document>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
<Pagination
|
|
||||||
value={pageNumber}
|
|
||||||
onChange={setPageNumber}
|
|
||||||
total={numPages ?? 0}
|
|
||||||
/>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</AppShell.Section>
|
</AppShell.Section>
|
||||||
|
<AppShell.Section>
|
||||||
|
{activeDocument && (
|
||||||
|
<Stack align="center">
|
||||||
|
<Pagination
|
||||||
|
value={pageNumber}
|
||||||
|
onChange={setPageNumber}
|
||||||
|
total={numPages ?? 0}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
)}
|
||||||
|
</AppShell.Section>
|
||||||
</AppShell.Aside>
|
</AppShell.Aside>
|
||||||
|
|
||||||
<AppShell.Footer p="md">
|
<AppShell.Footer p="md">
|
||||||
|
Loading…
Reference in New Issue
Block a user