Adjust DataTable scrollHeight attribute within the window resize event handler #95
-
Hi everyone, Within my application I do have a DataTable which has set the scrollHeight property to this: scrollHeight={(window.innerHeight-290).toString()+"px"}} This works perfectly fine, however i want to achieve the same behavior when I resize the window. I'm using the table ref which i defined like this: const tableRef=useRef<DataTable<any>>(null); But I don't see an option here to define the desired attribute, so i wonder if there is another way to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Can't you change this to a {(window.innerHeight-290).toString()+"px"}} |
Beta Was this translation helpful? Give feedback.
Can't you change this to a
useState
hook so it rerenders on change?