Handsontable: [8.0.0.-beta2-rev3] Hidden columns are not frozen

Created on 12 May 2020  路  3Comments  路  Source: handsontable/handsontable

Description

If the 2nd column is hidden and you have fixedColumnsLeft: 3 the hidden column should be fixed.

In 8.0.0-beta.2-rev3 3 visible are fixed - https://jsfiddle.net/6fk2dLn0/.
Zrzut ekranu 2020-05-12 o 10 35 58

Before that, the hidden one was also fixed and therefore only two visible were fixed.

Here is a 8.0.0-beta.1 demo - https://jsfiddle.net/mp3tv6qu/
Zrzut ekranu 2020-05-12 o 10 35 48

And here is a 7.4.2 demo - https://jsfiddle.net/tcf7u5p9/
Zrzut ekranu 2020-05-12 o 10 35 39

Your environment

  • Handsontable version: 8.0.0.-beta2-rev3
  • Browser Name and version: Chrome 80
  • Operating System: macOS Mojave
Fixing Hiding Regression Bug

Most helpful comment

Main case

hidden columns are not frozen solved in 8.0.0.-beta2-rev5
https://jsfiddle.net/8nrLv5b6/

Case 2

fixing a single column by fixedColumnsLeft set to 1 solved in 8.0.0.-beta2-rev5
https://jsfiddle.net/cogxzh8j/

Error case

Trowing Uncaught Error: TD or TH was expected to be rendered but is not in the console solved in 8.0.0.-beta2-rev5
https://jsfiddle.net/cogxzh8j/

@wszymanski good work!

All 3 comments

@pnowak found a problem at the revision 4 that there is no displayed fixed column for option fixedColumnsLeft set to 1: https://jsfiddle.net/34uh2ndc/11.

It should be fixed within https://github.com/handsontable/handsontable/commit/cd426248931ac3dbbd31e244d56541a109cafeb1.

@AMBudnik found a problem at the revision 4 that there is thrown error while we show hidden, fixed column.

Uncaught Error: TD or TH was expected to be rendered but is not

It should be fixed within https://github.com/handsontable/handsontable/commit/fbbec5565d0eb06edfc59e42f83f3bcdae93fc74, https://github.com/handsontable/handsontable/commit/bedeadf1aea3c1d69da54effb8d14bdbde663564.

It seems that refreshSelections function of the Table element (overlays; especially LeftOverlayTable) has performed before rendering already showed columns (using start function from the view.js).

https://github.com/handsontable/handsontable/blob/8e399b1c56153fde0c6203cdb55605a051324284/src/3rdparty/walkontable/src/utils/orderView/view.js#L152-L160

Thus, this part of the code has been performed too early.

https://github.com/handsontable/handsontable/blob/8e399b1c56153fde0c6203cdb55605a051324284/src/3rdparty/walkontable/src/selection.js#L128

Note: It seems that the problem has occurred only when the horizontal scroll for the table has existed.

Main case

hidden columns are not frozen solved in 8.0.0.-beta2-rev5
https://jsfiddle.net/8nrLv5b6/

Case 2

fixing a single column by fixedColumnsLeft set to 1 solved in 8.0.0.-beta2-rev5
https://jsfiddle.net/cogxzh8j/

Error case

Trowing Uncaught Error: TD or TH was expected to be rendered but is not in the console solved in 8.0.0.-beta2-rev5
https://jsfiddle.net/cogxzh8j/

@wszymanski good work!

Was this page helpful?
0 / 5 - 0 ratings