diff --git a/common/changes/@visactor/vtable/3702-bug-disabledragselect-frozencolcount_2025-04-07-07-57.json b/common/changes/@visactor/vtable/3702-bug-disabledragselect-frozencolcount_2025-04-07-07-57.json new file mode 100644 index 0000000000..f2133f76cb --- /dev/null +++ b/common/changes/@visactor/vtable/3702-bug-disabledragselect-frozencolcount_2025-04-07-07-57.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: when set frozen disableDragSelect not work #3702\n\n", + "type": "none", + "packageName": "@visactor/vtable" + } + ], + "packageName": "@visactor/vtable", + "email": "892739385@qq.com" +} \ No newline at end of file diff --git a/packages/vtable/src/event/listener/container-dom.ts b/packages/vtable/src/event/listener/container-dom.ts index e027054367..a026bed238 100644 --- a/packages/vtable/src/event/listener/container-dom.ts +++ b/packages/vtable/src/event/listener/container-dom.ts @@ -785,7 +785,7 @@ export function bindContainerDomListener(eventManager: EventManager) { table.stateManager.updateInteractionState(InteractionState.grabing); const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX); const targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY); - if (isValid(targetCol) && isValid(targetRow)) { + if (!table.options.select?.disableDragSelect && isValid(targetCol) && isValid(targetRow)) { table.stateManager.updateSelectPos(targetCol.col, targetRow.row, false, false, false, false); } });