Topic: datatable column width
ozgehan premium asked 5 years ago
Hi,
I have a datatable with two columns. Datatable arrange width of the columns by 50-50 (equal width) but I want to make one column smaller than the other one . How can I achieve that?
P.S : I am using mdb-datatable rather than normal mdb-tbl because of pagination and search options.
Thanks,
Magdalena Dembna staff answered 5 years ago
Unfortunately, we don't have a property which allows controlling the exact width of each column. You can try using the autoWidth
prop - it will adjust each column's width to its content. If this solution will not work for you, you can inspect the element in your dev tools and write custom CSS.
Kind regards,
Magdalena
Rickal Hamilton free commented 3 years ago
how do i add the autowidth prop
Mikołaj Smoleński staff commented 3 years ago
Here's an example code: <mdb-datatable-2 autoWidth>
. Best regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Premium
- Premium support: Yes
- Technology: MDB Vue
- MDB Version: 6.0.0
- Device: computer
- Browser: chrome
- OS: windows
- Provided sample code: No
- Provided link: No