Does anyone know why my scrolling isn't working on my datatable?

84 views Asked by At

So I tried making a datatable with the "PrimeReact" Library. But it seems like the scroll function isn't working.

I've tried looking everywhere for possible solutions but couldn't find a hint. After I tried recreating this issue in a codesandbox which I did here: https://codesandbox.io/p/sandbox/compassionate-feather-kk7nv4?file=%2Findex.html%3A4%2C29

It seems like there's something missing here, but I just don't know what.

Thanks in advance.

1

There are 1 answers

0
Melloware On BEST ANSWER

Fixed: https://codesandbox.io/p/sandbox/runtime-shape-m4lky

You were missing 3 things.

import 'primereact/resources/themes/lara-light-indigo/theme.css';   // theme
import 'primereact/resources/primereact.css';                       // core css

And on your table you need a scrollHeight

 scrollable scrollHeight="200px"