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
Having Extra line on Table #76
Comments
@mcamendoza1 are you on the last version of the component? I am unable to reproduce what you're showing. |
I'm using
|
import companies from 'data/sample/client-data.json'
const PAGE_SIZE = 1
const Client = () => {
const [page, setPage] = useState(1)
const [records, setRecords] = useState(companies.slice(0, PAGE_SIZE))
useEffect(() => {
const from = (page - 1) * PAGE_SIZE
const to = from + PAGE_SIZE
setRecords(companies.slice(from, to))
}, [page])
return (
<>
<div sx={{ backgroundColor: 'gray' }}>
<SimpleGrid
sx={{
marginLeft: 50,
}}
cols={1}
>
<div>
<h1>Client</h1>
<SimpleGrid cols={2}>
<div>
<p>Client Manager</p>
</div>
<Container
sx={{
align: 'right',
}}
>
<p>Client Manager</p>
</Container>
</SimpleGrid>
<DataTable
minHeight={150}
withBorder
columns={[
{ accessor: 'name', width: 100 },
{ accessor: 'streetAddress', width: 100 },
{ accessor: 'city', width: 100 },
{ accessor: 'state', width: 100 },
]}
// records={records}
records={[]}
totalRecords={companies.length}
recordsPerPage={PAGE_SIZE}
page={page}
onPageChange={(p) => setPage(p)}
noRecordsText="No records to show"
sx={{
marginRight: 50,
borderRadius: 5,
}}
/>
</div>
</SimpleGrid>
</div>
</>
)
} |
it seems i should put the datatable to a container or grid to avoid this |
Glad to hear you found a solution! |
The text was updated successfully, but these errors were encountered: