datatable column width


Topic: datatable column width

ozgehan pro 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 premium 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 commented 4 years ago

how do i add the autowidth prop


Mikołaj Smoleński staff commented 4 years ago

Here's an example code: <mdb-datatable-2 autoWidth>. Best regards


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.0.0
  • Device: computer
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No