-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] Data-table headers width doesn't work #5072
Comments
If you remove the |
Yes, removing the v-flex around it fixes the issue but then the whole layout is broken!? What to do? |
I am not using
Inside headers I tried to set width as follows: |
@saitam1 Do you have a fix for this already? Adding width keys to the headers array is not working. Setting a class also is not working. This is a long time issue already. I hope someone share their solution... |
I spent hours fighting this today. Nearly lost my mind. The fix for me?
Suddenly the widths in the header configs were honored. |
Not repaired yet? |
I have the same problem, the width attribute doesnt seem to work at all. |
Same here, |
my code:
and the css that fixed my problem!:
Hope this helps someone else! |
So the thing that solved it for me was adding this styling to the th tags inside the table's header:
My width's were then respected. headers: [
{ text: 'Account', value: 'name', sortable: true, width: '20%' },
{ text: 'Type', value: 'deliverable', sortable: true, width: '20%' },
{ text: 'Progress', value: 'progress', sortable: true, align: 'center', width: '10%' },
{ text: 'Delivery Date', value: 'design_delivered_at', sortable: true, align: 'center', width: '5%' },
{ text: 'Research or Design Rating', value: 'ratings', sortable: false, align: 'center', width: '20%' },
{ text: 'Reported Revenue', value: 'dollars', sortable: true, align: 'center', width: '10%' },
{ text: 'View', value: 'name', sortable: false, align: 'center', width: '5%' },
{ text: 'Request Edits', value: 'name', sortable: false, align: 'center', width: '5%' },
{ text: 'Created For', value: 'name', sortable: false, align: 'center', width: '5%' }
] |
This works for me:
Here is the css that make it work:
css |
Will this issue get fixed for 1.5 or only 2.0 ? |
It doesn't work for me too, I had to wrap the content with a <td>
<div style="width: 300px">...</div>
</td> not the best solution, but it works for now. |
Serious bug in major component over 8 months old now, can this be prioritized higher? |
Prioritization happens based on the availability of contributors. PRs are always welcome. |
It doesnt work, I've tried many of the options published here |
Repro in 2.0 https://codepen.io/gilderbairn/pen/rXOyWL |
setting both width and min-width as styles on header row was the only way I could get a consistent result closes #5072
I have used windows size to fix this problem. vue: js: |
<td style="min-width:55px;width:55px;max-width:55px"></td> |
This comment has been minimized.
This comment has been minimized.
why has this been closed? |
Because it's fixed We kindly ask users to not comment on closed/resolved issues. If you believe that this issue has not been correctly resolved, please create a new issue showing the regression or reach out to us in our Discord community. Thank you for your contribution and interest in improving Vuetify. |
@jacekkarczmarczyk sorry to bother you, but in my own experience, the issue was not resolved even once and I don't think this is a regression. I am still experiencing the non-honored widths without the suggested I'll post a working link to my code. |
Same thing here, it doesn't look like it's been solved |
This comment has been minimized.
This comment has been minimized.
It's not fixed at all. Show working example, please |
not working: #5072 (comment) If you believe that this issue has not been correctly resolved, please create a new issue showing the regression or reach out to us in our Discord community. |
Versions and Environment
Vuetify: 1.2.2
Vue: 2.5.17
Browsers: Chrome 69.0.3497.81
OS: Windows 10
Steps to reproduce
Create a data-table and add a "width" attribute to a header object
Expected Behavior
The column corresponding to the header object with the "width" attribute must have the desired width.
Actual Behavior
The width attribute is added to the DOM but this HTML attribute is deprecated for HTML5 and does nothing (cf: https://www.w3schools.com/TAGS/att_th_width.asp)
Reproduction Link
https://codepen.io/anon/pen/wEyZwN?editors=1010
Other comments
The suggested work-around provided by W3C that say to use the "width" CSS property doesn't work for this component.
The text was updated successfully, but these errors were encountered: