fix: 🐛 scroll for rtl direction (#111)

This commit is contained in:
Prssanna Desai 2020-09-16 11:45:20 +05:30 committed by GitHub
parent a0901768d7
commit 279a876f7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,9 +48,7 @@ export default class Style {
this._settingHeaderPosition = true;
requestAnimationFrame(() => {
const { scrollLeft, scrollWidth, clientWidth } = e.target;
let left = this.options.direction === 'rtl' ? scrollWidth - clientWidth - scrollLeft : -scrollLeft;
const left = -e.target.scrollLeft;
$.style(this.header, {
transform: `translateX(${left}px)`