Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute positioning makes the table styles go away #28

Open
kishaningithub opened this issue Oct 23, 2020 · 0 comments
Open

Absolute positioning makes the table styles go away #28

kishaningithub opened this issue Oct 23, 2020 · 0 comments
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kishaningithub
Copy link
Contributor

kishaningithub commented Oct 23, 2020

I have to position the table in a given position in the PDF. When i do absolute positioning, the table style including table borders completely disappears.

<PDFViewer>
    <Document>
        <Page>
            <View style={{ position: "absolute", left: 0, top: 0 }}>        
                <Table
                    data={[
                        {firstName: "John", lastName: "Smith", dob: new Date(2000, 1, 1), country: "Australia", phoneNumber: "xxx-0000-0000"}
                    ]}
                >
                    <TableHeader>
                        <TableCell>
                            First Name
                        </TableCell>
                        <TableCell>
                            Last Name
                        </TableCell>
                        <TableCell>
                            DOB
                        </TableCell>
                        <TableCell>
                            Country
                        </TableCell>
                        <TableCell>
                            Phone Number
                        </TableCell>
                    </TableHeader>
                    <TableBody>
                        <DataTableCell getContent={(r) => r.firstName}/>
                        <DataTableCell getContent={(r) => r.lastName}/>
                        <DataTableCell getContent={(r) => r.dob.toLocaleString()}/>
                        <DataTableCell getContent={(r) => r.country}/>
                        <DataTableCell getContent={(r) => r.phoneNumber}/>
                    </TableBody>
                </Table>
            </View>
        </Page>
    </Document>
</PDFViewer>
@dmk99 dmk99 added bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants