Skip to content
Advertisement

React Data Table Component – Header row not showing full text

so I am using an npm package called react-data-table-component. A problem that I am having with this is that I can’t adjust the width enough to display the full header text, as you can see here:

enter image description here

Here is the custom styling that I am using with this data table:

JavaScript

Here is the width setting that I am using for each column:

JavaScript

Currently I am using percentage to define the width, but I tried setting the exact width in pixel, but that would cause the last header to protrude out of the table like so:

enter image description here

If anyone can help me figure out what the exact issue is I would really appreciate it.

Advertisement

Answer

Just add this style to your App.css or App.scss and do hard refresh ctrl+shift+R

JavaScript
Advertisement