fix: column resizing in rtl direction

This commit is contained in:
Faris Ansari 2022-01-17 16:36:58 +05:30
parent 4549a5176b
commit 95a239963c
3 changed files with 11 additions and 1 deletions

View File

@ -189,6 +189,7 @@
dynamicRowHeight: true,
treeView: treeView,
showTotalRow: true,
// direction: 'rtl',
// language: 'myLang',
// translations: {
// myLang: {

View File

@ -174,7 +174,11 @@ export default class ColumnManager {
const onMouseMove = (e) => {
if (!isDragging) return;
const finalWidth = startWidth + (e.pageX - startX);
let delta = e.pageX - startX;
if (this.options.direction === 'rtl') {
delta = -1 * delta;
}
const finalWidth = startWidth + delta;
const {
colIndex
} = $.data($resizingCell);

View File

@ -164,6 +164,11 @@
}
}
.datatable[dir=rtl] .dt-cell__resize-handle {
right: unset;
left: -3px;
}
.icon-open, .icon-close {
width: 16px;
height: 16px;