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

Add support for the ability to disable column virtualization #10599

Merged
merged 18 commits into from Dec 6, 2023

Conversation

budnix
Copy link
Member

@budnix budnix commented Nov 21, 2023

Context

The PR adds support for the ability to disable column virtualization throughout the new renderAllColumns option.

In conjunction with the renderAllRows option, developers have the ability to disable virtualization for the whole table.

Option combinations summary

renderAllColumns: true,
renderAllRows: false,

Disables the column's virtualization only. This setup only makes sense when there is no vertical scroll (many columns and few rows). Due to the table nature where columns are related to rows (TD are children of TR), additional cell renders in all columns will be triggered when the vertical scroll changes, causing rows to re-render. The best setup for renderAllColumns is to disable the rows virtualization as well.

renderAllColumns: true,
renderAllRows: true,

In this case, the cells are rendered only once, no matter how big the dataset is. For both axes, there is a logged warning in the console that informs that there will be a performance drop if you disable the virtualization for 1000 or more records. And last one:

renderAllColumns: false,
renderAllRows: true,

Disables virtualization for rows. The horizontal scroll does not affect the rows to re-render.

Other changes

  • Simplify the ViewportColumnsCalculator calculator by extracting the calculation of the stretching width to a separate module;

How has this been tested?

I tested the changes locally and I covered the feature with new tests.

Types of changes

  • New feature or improvement (non-breaking change which adds functionality)

Related issue(s):

  1. fixes https://github.com/handsontable/dev-handsontable/issues/1457

Affected project(s):

  • handsontable

Checklist:

@budnix budnix self-assigned this Nov 21, 2023
Copy link

github-actions bot commented Nov 24, 2023

Launch the local version of documentation by running:

npm run docs:review d230c64db1ebf8d79a71554fc958fbf53bcc53c9

@budnix budnix marked this pull request as ready for review November 30, 2023 07:47
@budnix budnix changed the title [wip] Add support for the ability to disable column virtualization Add support for the ability to disable column virtualization Nov 30, 2023
@budnix budnix merged commit 2526ddd into develop Dec 6, 2023
23 checks passed
@budnix budnix deleted the feature/dev-issue-1457 branch December 6, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants