mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
fix(virtual-scroll): use correct item top calculation with header or footer function (#15948) (#17345)
- use the right index in updateVDom to update the top transition () - extend unit test to verify the top is also calculated right with a given headerFn and footerFn - update the visibility of the node also if a given approxHeaderHeight/approxFooterHeight matches the calculated height fixes #15948 fixes #17298
This commit is contained in:
committed by
Brandy Carney
parent
016fa16d44
commit
a8a48a4ca4
@ -327,9 +327,9 @@ export class VirtualScroll implements ComponentInterface {
|
||||
if (cell !== this.cells[index]) {
|
||||
return;
|
||||
}
|
||||
cell.visible = true;
|
||||
if (cell.height !== height) {
|
||||
console.debug(`[virtual] cell height changed ${cell.height}px -> ${height}px`);
|
||||
if (cell.height !== height || cell.visible !== true) {
|
||||
console.debug(`[virtual] cell height or visibility changed ${cell.height}px -> ${height}px`);
|
||||
cell.visible = true;
|
||||
cell.height = height;
|
||||
this.indexDirty = Math.min(this.indexDirty, index);
|
||||
this.scheduleUpdate();
|
||||
|
||||
Reference in New Issue
Block a user