sap.ui.table.Table: Column resized too wide with frozen percent-based columns
OpenUI5 version: latest
Browser/version (+device/version): All
Any other tested browsers/devices(OK/FAIL):
URL (minimal example if possible): http://jsbin.com/foromaxate/edit?js,output
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:
- Right-click on Column 1 header and select "Freeze"
- Resize Column 2 header
- Observe width of resized header
What is the expected result? Expected the width of the resized header to remain the same as when the user completes the resize.
What happens instead? After resizing the column, it expands to the full width of the table and no other columns are visible. In IE 11, this happens to the frozen column as soon as you freeze it.
Any other information? (attach screenshot if possible)
Thanks for reporting. Looks like a bug to me. Internal reference: 1670350323
I'm sure if anyone has had a chance to look into the issue this won't be new information but I have found an another related scenario that exhibits the same behavior.
Looking at some similar issues we've seen with column resize, it does not appear to be specific to %-based column widths. Here is another sample with px-based widths. http://jsbin.com/xutemuragu/edit?output The main thing to highlight in the sample is the sum of columns widths is purposefully less than the table widths.
It seems to be there is a scenario where the Table is trying to recalculate column widths and is trying to scale numbers that don't perfectly add up to 100% or are less than the width of the whole table that has some issues. The calculations Table is performing in Table.prototype._resizeDependentColumns makes sense and looks right but it seems there is something not quite fully accounted for.
@nickroth thanks for sharing! As of now there is no update to this - sorry 😢 In case you can suggest a solution to this please feel free to create a PR 😉
This is not a bug. Fixed columns should always have a width in absolute units of measure, for example: "6rem" or "100px". The framework does not change the width property depending of the number of fixed columns. If an application allows the user to fix some columns, it and all columns to the left of it should have fixed width.
See https://openui5.hana.ondemand.com/#docs/api/symbols/sap.ui.table.Table.html#getFixedColumnCount
Hi @ulasenka the issue we've highlighted isn't so much about the widths of the fixed columns. If you look at the second JSbin sample I provided you can see all the column widths are in px. If you freeze the first column then try to resize the second, you can observe some unexpected behavior. For example, if I freeze the first column then try to make the second column slightly smaller, the second column will actually get bigger.
Please consider reopening or at least letting us know that there is no intention to fix the problem. Thanks.
Bug in sap.ui.table.Table.prototype._resizeDependentColumns
Fixes are provided.