react-bootstrap-table2
react-bootstrap-table2 copied to clipboard
Dynamically resize column widths to fit all content
Hello,
Is there any way to re-size table columns automatically based on their content's size? My table is currently formatted with all columns having equal widths while their contents differ in size. The result looks ugly because some content does not fit the column space completely and in other columns there is a lot of blank space:

applying style: { width: "fit-content" } does not work. Can you please help?
@dnorrstrand I haven't had any trouble with my tables. Make sure you're including the styling in your file:
import 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'
Also, get rid of any custom styling relating to column width that you put on. It may be interfering.
Also, Check our bootstraps responsive tables.
In this link You can find help https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/1160