Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.32k stars 534 forks source link

[Bug]: ShowHeaderGroupCaptions messes with DataGrid Layout #5804

Open Alexander-JM-0224 opened 1 month ago

Alexander-JM-0224 commented 1 month ago

Blazorise Version

1.6.2

What Blazorise provider are you running on?

Bootstrap5

Link to minimal reproduction or a simple code snippet

https://github.com/Alexander-JM-0224/BlazoriseDataGridTestApp.git

Steps to reproduce

Open the app, switch between the 2 pages in the navbar and see the difference.

What is expected?

My expectation would be that when i have a nice working DataGrid where the styling is okay and the columns are the correct width. Adding the ShowHeaderGroupCaptions should not mess with the layout of the DataGrid

What is actually happening?

Well, when i add the ShowHeaderGroupCaptions is smushes soms columns. Does not respect the Width attributes we added to the columns.

First the DataGrid without ShowHeaderGroupCaptions. Image

Then the DataGrid with ShowHeaderGroupCaptions. Image

Now how it should be. Image

What i need to do to make the DataGrid correct is in the inspector i need to turn 2 Width properties off, then it is showing correct spacing. Image

What browsers do you see the problem on?

Chrome, Firefox

Any additional comments?

This is a small difference, but it is not something we want to have happen, and i sincerely doubt this should be the expected behaviour of the functionality.

Please, if i am missing something, or there is a simple workaround please let me know.

stsrki commented 4 weeks ago

Please, if i am missing something, or there is a simple workaround please let me know.

Since this is coming from Bootstrap by default, I believe it is best to add some custom CSS rules on your project side as a workaround until we make a fix for this.

.table-fixed-header table.b-table
{
  width: unset:
}
Alexander-JM-0224 commented 4 weeks ago

Thankyou, this will be fine for the time being. The workaround is working for me!

stsrki commented 1 week ago

Hello @Alexander-JM-0224

Due to time and some technical difficulties, we have postponed the fix for this issue for another release. Hopefully, we will find a better solution by then.

Alexander-JM-0224 commented 1 week ago

Hello @Alexander-JM-0224

Due to time and some technical difficulties, we have postponed the fix for this issue for another release. Hopefully, we will find a better solution by then.

Hello @stsrki, i was following the PR and was thinking.. Yeah this might not be a quick fix ;)
But the workaround works for us for now, and does not interfere with our other styling rules we have in place.

Thanks for the actions at least!