Skip to content

Commit

Permalink
fix: disable virtual scrolling temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
xujingli authored and sunshinesmilelk committed Dec 26, 2024
1 parent 54b522c commit 2462341
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ export class VirtualizedManager implements IVirtualizedManager {
* @param size undefined 或者 单位 为B
* @returns 是否使用虚拟滚动
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
openVirtualized = async (length: number, size?: number) => {
this.isVirtualized = false;
return false;
// this.isVirtualized = true;
// return true;
if (length > 100 || (size && size > 4)) {
this.isVirtualized = true;
return true;
} else {
this.isVirtualized = false;
return false;
}
// if (length > 100 || (size && size > 4)) {
// this.isVirtualized = true;
// return true;
// } else {
// this.isVirtualized = false;
// return false;
// }
};
}
16 changes: 9 additions & 7 deletions packages/libro-core/src/virtualized-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ export class VirtualizedManager implements IVirtualizedManager {
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
openVirtualized = async (length: number, size?: number, path?: string) => {
this.isVirtualized = false;
return false;
// this.isVirtualized = true;
// return true;
if (length > 100 || (size && size > 4)) {
this.isVirtualized = true;
return true;
} else {
this.isVirtualized = false;
return false;
}
// if (length > 100 || (size && size > 4)) {
// this.isVirtualized = true;
// return true;
// } else {
// this.isVirtualized = false;
// return false;
// }
};
}

0 comments on commit 2462341

Please sign in to comment.