You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We are using your DataGrid and have come across an issue when it is used in either Chrome or Edge. Firefox has no issue.
When you have a grid that has advanced filtering turned on and the number of columns is such that the horizontal scroll bar shows, when you <Shift>+Click on the scroll bar the browser "freezes" for a noticable time on most clicks.
We've had similar problems using RadzenDataGrid in our project. It happens specifically when selecting an element in the grid, and then holding down any button on your keyboard.
It's especially noticeable in a grid with a lot of columns and thus, a horizontal scroll bar. If you select a row and then try to use shift + scroll on such a grid, it immediately starts stuttering.
This demo has an easy way to reproduce this: https://blazor.radzen.com/datagrid-dynamic?theme=standard
Apparently this happens due to the onkeydown event that was added to the RadzenDataGrid component in version 4.23.0. When you hold a key down, it triggers StateHasChanged() a lot of times in quick succession, which naturally causes a grid with a lot of columns to stutter.
I've been able to fix it in our project by using a modified implementation of the ShouldRender() override in this issue. By returning my own bool in said method and setting it to false in an override of the OnKeyDown of the RadzenDataGrid component, I can control when I want the component to re-render and when I don't. I've also found some documentation about handling events without state changes. Using EventUtil.AsNonRenderingEventHandler() when calling a method from the event seems to avoid the re-render entirely. Perhaps this could be used in a setting in the DataGrid somewhere, for people who want to avoid re-renders due to that onkeydown?
Describe the bug
We are using your DataGrid and have come across an issue when it is used in either Chrome or Edge. Firefox has no issue.
When you have a grid that has advanced filtering turned on and the number of columns is such that the horizontal scroll bar shows, when you
<Shift>+Click
on the scroll bar the browser "freezes" for a noticable time on most clicks.To Reproduce
Steps to reproduce the behavior:
AllowFiltering="true"
FilterMode="FilterMode.Advanced"
FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
<Shift>+Click
to the right of the horizontal scroll bar's grab handleActual behavior
Significant delays are seen between the mouse click and the grid showing different columns.
Expected behavior
No delays are seen between the mouse click and the grid showing different columns.
Screenshots
![image](https://private-user-images.githubusercontent.com/13162784/302672310-58ee1615-fc11-4358-8425-68def5698138.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMjQyNjUsIm5iZiI6MTcyNjEyMzk2NSwicGF0aCI6Ii8xMzE2Mjc4NC8zMDI2NzIzMTAtNThlZTE2MTUtZmMxMS00MzU4LTg0MjUtNjhkZWY1Njk4MTM4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA2NTI0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEzZGE5M2E5YmY1ZWQ4ZjkzNGRhNTE5NjcyMjc3MDFjOTRjMTk2ZDc2MGZiMjExNWZmNDEzYzYxMTdlYWFhZjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YGJxySps41SNdV-L0xEv9PRU1j8SieIUaBMg2p5Cjko)
Desktop (please complete the following information):
Chrome Version 121.0.6167.140 (Official Build) (64-bit),
Edge Version 121.0.2277.98 (Official build) (64-bit)
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: