Iam edit on this function with name onBodyScroll(event)
and et my selected language from local storage
You can choose an other way by direction value
this is path file edit node_modules/primeng/fesm2022/primeng-treetable.mjs
This is My code use for this sollution in function
onBodyScroll(event) {
if (this.preventBodyScrollPropagation) {
this.preventBodyScrollPropagation = false;
return;
}
if (this.scrollHeaderViewChild && this.scrollHeaderViewChild.nativeElement) {
let lang = JSON.parse(localStorage.getItem('lang'))['code'] || 'en'
if(lang == 'ar'){
this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft = 'unset'
this.scrollHeaderBoxViewChild.nativeElement.style.marginRight = event.target.scrollLeft + 'px';
}else{
this.scrollHeaderBoxViewChild.nativeElement.style.marginRight = 'unset'
this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft = -1 * event.target.scrollLeft + 'px';
}
}
if (this.scrollFooterViewChild && this.scrollFooterViewChild.nativeElement) {
this.scrollFooterBoxViewChild.nativeElement.style.marginLeft = -1 * event.target.scrollLeft + 'px';
}
if (this.frozenSiblingBody) {
this.frozenSiblingBody.scrollTop = event.target.scrollTop;
}
}