fix: column resizing in rtl direction
This commit is contained in:
parent
4549a5176b
commit
95a239963c
@ -189,6 +189,7 @@
|
|||||||
dynamicRowHeight: true,
|
dynamicRowHeight: true,
|
||||||
treeView: treeView,
|
treeView: treeView,
|
||||||
showTotalRow: true,
|
showTotalRow: true,
|
||||||
|
// direction: 'rtl',
|
||||||
// language: 'myLang',
|
// language: 'myLang',
|
||||||
// translations: {
|
// translations: {
|
||||||
// myLang: {
|
// myLang: {
|
||||||
|
|||||||
@ -174,7 +174,11 @@ export default class ColumnManager {
|
|||||||
|
|
||||||
const onMouseMove = (e) => {
|
const onMouseMove = (e) => {
|
||||||
if (!isDragging) return;
|
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 {
|
const {
|
||||||
colIndex
|
colIndex
|
||||||
} = $.data($resizingCell);
|
} = $.data($resizingCell);
|
||||||
|
|||||||
@ -164,6 +164,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.datatable[dir=rtl] .dt-cell__resize-handle {
|
||||||
|
right: unset;
|
||||||
|
left: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
.icon-open, .icon-close {
|
.icon-open, .icon-close {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user