datatable column width


Topic: datatable column width

ozgehan asked a year 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 a year 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 3 months ago

how do i add the autowidth prop


Mikołaj Smoleński staff commented 3 months ago

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


Please insert min. 20 characters.
Status

Answered

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