fix: 🐛 scroll for rtl direction (#111)
This commit is contained in:
parent
a0901768d7
commit
279a876f7d
@ -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)`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user