-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTable: Horizontal Virtual Scroll in DataTable Displays Unexpected Behavior #7524
Comments
Hi, sja-cslab Thank you for your response, and I appreciate your suggestion. Apologies for not adjusting the I have now adjusted the |
Thank you for following up. Yes, I've tried removing both the orientation and scrollWidth parameters. While this does resolve the display issues (showing full data without misalignment), it only enables vertical virtualization. I verified this using DevTools - the component now correctly virtualizes vertically by rendering only about 15 rows at a time (out of 10,000 total rows), but horizontally it still renders all 29 columns at once. The horizontal virtualization should work similarly to the vertical one, only rendering the visible columns rather than the entire set. This is why I need to maintain the orientation: 'both' setting to achieve virtualization in both directions. |
Thanks @sja-cslab closing as "By Design" |
Hi, sja-cslab, Thank you for pointing that out, and I sincerely apologize for not noticing that line in the documentation. I saw that the I truly appreciate your response and assistance. I'm sorry for wasting your time due to my oversight. Thank you again for your help! |
Describe the bug
When using the 'horizontal' or 'both' virtual scroll options in the DataTable component, the display does not behave as expected. The virtual scroll works normally when using only the 'vertical' option, but issues arise when enabling 'horizontal' or 'both'. The problems include one or both of the following scenarios:
Details are described in the Steps to reproduce the behavior section below.
Could you please investigate this issue or provide guidance on how to resolve it? Thank you!
Reproducer
System Information
Steps to reproduce the behavior
1. Missing part of the data: Some data rows or columns are not displayed.
To simulate a large number of columns, I duplicated the dataset five times with columns: Vin, Year, Brand, and Color. Below is an example of the structure
In the problematic scenario, when scrolling horizontally to the end, some columns are missing while others are displayed. For example, it may only show the second set of columns, while parts of the other sets are missing.Here's a Stackblitz demo demonstrating the issue. Note that this problem's behavior varies based on the window size and may sometimes result in the Column misalignment issue described below.
2. Column misalignment: Columns become dislocated or misaligned.
I adjusted all columns and cells to a uniform width of 100px using CSS. While this fixed the issue of missing data, it resulted in column misalignment instead. You can see this behavior in another Stackblitz demo.
Expected behavior
When scrolling, all data should be displayed, and the column positions should remain correct.
The text was updated successfully, but these errors were encountered: