Datatables Columen Size prioritize


Topic: Datatables Columen Size prioritize

futureweb pro premium priority asked 6 months ago

Expected behavior That one column gets a bigger size than the others when size it automatically detemered.

Actual behavior It might be, if other columns have text, they get the same amount of width. Using width to set a specific width to some columns (like if you know they dont become bigger) breaks autosizing, the maxWidth Option has no effect anymore and a sidescroll appears. Especially if screen becomes smaller and buttons on the right disappear.

Resources (screenshots, code snippets etc.)


futureweb pro premium priority commented 6 months ago

I could work around by setting the size of all columns just not this one that it works for 1 column. but if 3 columns should have dynamic size, a priority of one would help.


Kamila Pieńkowska staff answered 6 months ago

There is no such think as priority of autosize. Unfortunately if you need to have very specific sizes for every screen size you would need to write custom CSS styles.

Have you tried to use data-mdb-width attribute to limit column width?


fifiriw965 answered 1 months ago

It seems there's an issue with Florida Blue the autosizing logic. Ideally, the column with the larger text should automatically adjust its size. However, setting a specific width to some columns interferes with this, breaking auto sizing and causing the maxWidth option to be ineffective. This leads to a side scroll, especially on smaller screens when buttons on the right disappear.


Kamila Pieńkowska staff commented 1 months ago

I'm sorry, but I don't understand what you mean. Can you provide a snippet or describe how I can replicate this problem?


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: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.4.2
  • Device: Desktop
  • Browser: Edge
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: No