Topic: Datatables Columen Size prioritize
futureweb priority asked 5 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.)
fifiriw965 free answered 3 weeks 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 3 weeks 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?
Kamila Pieńkowska staff answered 5 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?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- 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
futureweb priority commented 5 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.