简体   繁体   English

隐藏冻结行后冻结 position 正在发生变化 - NatTable

[英]Freeze position is changing after hiding the freeze row - NatTable

I am using freeze, hide and showall on NatTable.我在 NatTable 上使用 freeze、hide 和 showall。 When I perform freeze on any row, lets suppose 3rd row and hide that row, then the freeze indicator gets shifted to the previous row ie 2nd row.当我对任何行执行冻结时,假设第 3 行并隐藏该行,然后冻结指示器转移到前一行,即第 2 行。 And when I do showAll rows then the freeze indicator remains below the 2nd row.当我做 showAll rows 时,冻结指示器保持在第二行下方。 If I repeat the hiding of the freezed row and perform show all, at a point the freeze indicator will be above 1st row and then it disappears after repeating it once more.如果我重复隐藏冻结行并执行全部显示,则冻结指示器将在第一行上方,然后在再次重复后消失。

Freeze performed on 3rd row在第 3 行执行冻结

Hiding the 3rd row隐藏第三行

Performing show all rows执行显示所有行

Is it expected behaviour or an issue?这是预期的行为还是问题? If it is an issue, how to resolve it?如果是问题,如何解决?

The freeze state is based on positions.冻结 state 是基于位置的。 If you hide a row on the freeze border it is not possible to identify if the row that gets visible again was part of the frozen area or the non-frozen area.如果您在冻结边框上隐藏一行,则无法确定再次可见的行是冻结区域的一部分还是非冻结区域的一部分。 Currently the implementation interpretes that case as the new visible column belongs to the non-frozen area.目前,实现将这种情况解释为新的可见列属于非冻结区域。 This decision was made IIRC because typically the frozen area is non modifiable, means a user should not hide rows or columns interactively in a frozen area.这个决定是由 IIRC 做出的,因为通常冻结区域是不可修改的,这意味着用户不应在冻结区域中以交互方式隐藏行或列。 At least for projects I worked in. That is of course discussable, but that is how it is right now.至少对于我参与的项目而言。这当然是可以讨论的,但现在就是这样。 So if you need to support a fixed freeze border and allow hiding in the frozen area, you probably need to ensure via an event listener that on structural changes the freeze border stays at its fixed position.因此,如果您需要支持固定的冻结边界并允许隐藏在冻结区域中,您可能需要通过事件侦听器确保在结构更改时冻结边界保持在其固定的 position。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM