Open eickhardt opened 6 years ago
I'm having the same issue. Any work around?
I am also experiencing same issue. Any ideas would be greatly appreciated.
Found a workaround using the zone:
import { NgZone } from '@angular/core';
constructor(private _zone: NgZone) {}
public onSelect(event: any): void {
// "Zone" needed to fix ndx-datatable slow selection after scrolling
this._zone.run(() => {
this.selectionChanged.emit(event);
});
}
Found resolution in issue #1264 by downgrading to version 11.0.4 .
Below workaround worked for me in version 11.0.4. A mouse click on anywhere in screen solves the problem. So you can click to container div or directly on table when check box changed.
onCheckBoxChange(){
document.getElementById(<elementId>).click();
}
We are facing the same issue, using virtual scrolling. It seems to me like the events that are attached on each row don't get cleaned up when the element gets removed and reattached to the DOM? It will get worse over time. The above hints don't help us in fixing the problem unfortunately.
This makes virtual scrolling a neat feature, but practically unusable.
**I'm submitting a ...
Current behavior I have a table with 40 rows using virtual scrolling and paging client side. I click a row and it becomes selected. Then I scroll to the bottom of the table and back up to the top 5 consecutive times. Now when I click a row it becomes selected, but only after more than 1 second. This delay is a problem, because we use that selection to control other components.
Expected behavior Instantly select the clicked row without delay, also after any amount of scrolling.
What is the motivation / use case for changing the behavior? We want to be able to quickly select a row and execute some other action based on that instantly after.
Please tell us about your environment: Windows 7 Enterprise, Visual Studio Code
Table version: 11.1.7
Angular version: 5.0.5 CLI 1.7.4
Browser: Chrome 65.0.3325.181
Language: TypeScript 2.4.2