angular-ui / ui-grid

UI Grid: an Angular Data Grid
http://ui-grid.info
MIT License
5.39k stars 2.47k forks source link

fix: 3527 Columns to the right disappear while Horizontally Scrolling #7155

Closed prx-lmo closed 3 years ago

prx-lmo commented 3 years ago

Use Case: grid has 100 columns, the first column is enlarged to 50% of grid width, it is scrolled to the middle(50%)

previously: assumes that all columns have the same width; 50% of 100 columns is 50 -> colIndex is set to 50; if excessColumns isn't high enough(default is 4) the cached Columns begin at Index 46

now: accumulates the drawnWidth of all columns till 50%(or whatever left position it has) and returns the index of the column which reached the treshold -> colIndex is set to 0; the cached Columns begin at Index 0

commit-lint[bot] commented 3 years ago

generate by www.commit-lint.com

Commit-Lint commands
You can trigger Commit-Lint actions by commenting on this PR: - `@Commit-Lint merge patch` will merge dependabot PR on "patch" versions (X.X.Y - Y change) - `@Commit-Lint merge minor` will merge dependabot PR on "minor" versions (X.Y.Y - Y change) - `@Commit-Lint merge major` will merge dependabot PR on "major" versions (Y.Y.Y - Y change) - `@Commit-Lint merge disable` will desactivate merge dependabot PR - `@Commit-Lint review` will approve dependabot PR - `@Commit-Lint stop review` will stop approve dependabot PR
mportuga commented 3 years ago

NOTE to self: retest behavior described by the following commit after merging this: https://github.com/angular-ui/ui-grid/commit/767e0228006b7ddcc9685b502c25733db1d6ff94