2

I'm trying to use react-perfect-scrollbar on react-table but it doesn't work, it does on a custom table.

<PerfectScrollbar>
        <Table className='table'>
          <thead className='table-head'><tr>{head}</tr></thead>
          <tbody className='DashboardCard-table-body'>{body}</tbody>
        </Table>
      </PerfectScrollbar>

I tried this:

<PerfectScrollbar>
    <ReactTable data={data} columns={columns} />    
</PerfectScrollbar>

It should show the new scrollbar but it doesn't.. haven't found information anywhere.

1 Answer 1

2

Have you tried setting a height on the PerfectScrollbar JSX element? I had a similar issue that I solved with this:

<PerfectScrollbar style={{ height: "100vh" }}>
    ...Your content...
</PerfectScrollbar>

You might need to use a different value for height, but apparently the scrollbar needs a height value.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.