Skip to content
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

Datagrid: "last" option does not stretch last column width #4913

Closed
s-werking opened this issue Mar 4, 2021 · 5 comments · Fixed by #5055
Closed

Datagrid: "last" option does not stretch last column width #4913

s-werking opened this issue Mar 4, 2021 · 5 comments · Fixed by #5055
Assignees
Labels
team: lawson For lawson issues type: bug 🐛 [2] Velocity rating (Fibonacci)

Comments

@s-werking
Copy link
Contributor

Describe the bug
When setting the datagrid option stretchColumn to "last", the last column width remains the original calculated value, and does not stretch to the end of the grid.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the attached html page
  2. Notice that the last column does not stretch to the edge of the datagrid. The other columns have instead stretched larger than their calculated widths.

example-drilldown.zip

Expected behavior
When stretchColumn is set to "last" it is expected that all columns except the last column are not stretched and the last column is stretched to the end of the grid.

Version

  • ids-enterprise: v4.38.0-dev

Screenshots
What the datagrid looks like:
image

What the datagrid would look like with a stretched last column:
image

Platform

  • Infor Application/Team Name: lawson
  • Device: (if applicable) N/A
  • OS Version: Windows10
  • Browser Name: chrome
  • Browser Version: 89.0.4389.72 (Official Build) (64-bit)
@tmcconechy
Copy link
Member

Can you also post that code change you think might fix? Note that a workaround for this we found investigating is to set stretchColumn: 'lastColumnId' instead of 'last'

@tmcconechy tmcconechy added [2] Velocity rating (Fibonacci) team: lawson For lawson issues type: bug 🐛 labels Mar 4, 2021
@s-werking
Copy link
Contributor Author

A possible solution for this would be adding something like this inside the 'if' that checks for lastColumn on line 4784 of datagrid.js. It might be an adjusted value from this based on padding and edges :
if (this.settings.stretchColumn === 'last') {
colWidth = diff;
}

@tmcconechy
Copy link
Member

Another idea could be if last is set then set it to the last columns ID (which works).

@tmcconechy tmcconechy added this to To do in Enterprise 4.52.x (May 2021) Sprint via automation Mar 26, 2021
@s-werking
Copy link
Contributor Author

One issue we have noticed with using stretchColumn on the last column, is when resizing the last column past the edge of the datagrid the column is lost and the scrollbar only scrolls to the end of the second-to-last column.

s-werking added a commit to s-werking/enterprise that referenced this issue Apr 5, 2021
@tmcconechy tmcconechy moved this from To do to Pending Review in Enterprise 4.52.x (May 2021) Sprint Apr 6, 2021
@tmcconechy tmcconechy removed this from Pending Review in Enterprise 4.52.x (May 2021) Sprint Apr 22, 2021
@tmcconechy tmcconechy added this to To do in Enterprise 4.51.x (Apr 2021) Sprint via automation Apr 22, 2021
@tmcconechy tmcconechy moved this from To do to Ready for QA (beta) in Enterprise 4.51.x (Apr 2021) Sprint Apr 22, 2021
@janahintal
Copy link
Contributor

@janahintal janahintal moved this from Ready for QA (beta) to Done in Enterprise 4.51.x (Apr 2021) Sprint Apr 26, 2021
@tmcconechy tmcconechy moved this from Done to NG Checked and Done in Enterprise 4.51.x (Apr 2021) Sprint Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: lawson For lawson issues type: bug 🐛 [2] Velocity rating (Fibonacci)
Projects
No open projects
Enterprise 4.51.x (Apr 2021) Sprint
  
NG Checked and Done
Development

Successfully merging a pull request may close this issue.

3 participants