Perf: Eliminate first-scroll unresponsiveness
This commit is contained in:
parent
e8d8e17b7d
commit
667b08c895
1
TEST.md
1
TEST.md
@ -34,3 +34,4 @@
|
|||||||
- Successfully decoupled dynamic UI states (like `.dt-cell-selected`) from the declarative binding framework. We now use manual DOM manipulation (`applySelectionUI`) during `refresh` to sync states.
|
- Successfully decoupled dynamic UI states (like `.dt-cell-selected`) from the declarative binding framework. We now use manual DOM manipulation (`applySelectionUI`) during `refresh` to sync states.
|
||||||
- This manual sync completely prevents "Dependency Floods" where scrolling would trigger heavy `$class` evaluations on every cell. We maintained the Zero-Scan status while supporting rich interactions.
|
- This manual sync completely prevents "Dependency Floods" where scrolling would trigger heavy `$class` evaluations on every cell. We maintained the Zero-Scan status while supporting rich interactions.
|
||||||
- Fixed a VirtualScroll jumping bug at row 70+ by re-enabling `onItemUpdate` so VirtualScroll correctly learns the 40px row height instead of using its 32px default.
|
- Fixed a VirtualScroll jumping bug at row 70+ by re-enabling `onItemUpdate` so VirtualScroll correctly learns the 40px row height instead of using its 32px default.
|
||||||
|
- **Scroll Initiation Fix**: Removed the `setTimeout` wrapper around `vs.init` during `reset`. Previously, the first scroll often hit a "blank wall" because VirtualScroll's internal metrics hadn't finished initializing when the user made their first swift scroll motion. Synchronous initialization resolved this completely.
|
||||||
|
|||||||
@ -30,11 +30,9 @@ export const createScrollManager = (container, state, onRenderedListChange) => {
|
|||||||
reset: (list) => {
|
reset: (list) => {
|
||||||
state._listStartIndex = 0;
|
state._listStartIndex = 0;
|
||||||
state._renderedList = vs.reset(list, scrollEl || container) || [];
|
state._renderedList = vs.reset(list, scrollEl || container) || [];
|
||||||
setTimeout(() => {
|
if (state.list === list) {
|
||||||
if (state.list === list) {
|
vs.init(list, refresh);
|
||||||
vs.init(list, refresh);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
updateRowHeight: (index, node) => {
|
updateRowHeight: (index, node) => {
|
||||||
// Restore this call so VirtualScroll can learn the actual height
|
// Restore this call so VirtualScroll can learn the actual height
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user