Skip to content
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

fix scroll to column in rtl #207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dawidholisz
Copy link

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

Comment on lines +82 to +86
const columnIndex = computedProps.rtl
? columnsCount - col.computedVisibleIndex
: col.computedVisibleIndex;
computedProps.scrollToColumn(columnIndex, { duration: 50 });
});
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My changes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i face the same issue @team could you check and merge this change plz?!

@dawidholisz
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants