reactdatagrid icon indicating copy to clipboard operation
reactdatagrid copied to clipboard

fix scroll to column in rtl

Open dawidholisz opened this issue 3 years ago • 1 comments

I found an issue with scrolling to the column on editing started. For LTR it works correctly but when we pass rtl={true} to a component, UI is switched but scroll doesn't work like expected. When I click on the last column (in rtl it is first from left), the grid scrolls to the first column from the right. I add a condition that checks if we use rtl mode.

To reproduce it, I added few dump columns (horizontal scroll must be visible)

Demo: Before: https://user-images.githubusercontent.com/15018254/140797892-dbc5b9d3-76e1-435a-8d6a-623a7cfb0212.mp4

After: https://user-images.githubusercontent.com/15018254/140795769-26462f5b-e6bd-4e90-975c-6548c34417f7.mp4

dawidholisz avatar Nov 08 '21 18:11 dawidholisz

I noticed that after applying prettier, it is hard to notice my changes. I added comment with my changes

dawidholisz avatar Nov 08 '21 18:11 dawidholisz