diff --git a/lib/dtable/src/plugins/resize/index.tsx b/lib/dtable/src/plugins/resize/index.tsx index 7e1838aa45..90994d4bc1 100644 --- a/lib/dtable/src/plugins/resize/index.tsx +++ b/lib/dtable/src/plugins/resize/index.tsx @@ -1,3 +1,4 @@ +import {$} from '@zui/core'; import {clamp} from '../../helpers/number'; import {definePlugin} from '../../helpers/shared-plugins'; import {mousemove} from '../mousemove'; @@ -84,7 +85,8 @@ const resizePlugin: DTablePlugin = { if (!splitter) { return; } - const colName = splitter.closest('.dtable-cell')?.dataset.col; + const cellElement = splitter.closest('.dtable-cell'); + const colName = cellElement?.dataset.col; if (!colName) { return; } @@ -94,7 +96,10 @@ const resizePlugin: DTablePlugin = { startSize: this.state.colsSizes[colName] ?? 0, startX: event.clientX, }, + }, () => { + $(cellElement!).zuiCall('ContextMenu.hide'); }); + return false; }, dblclick(event) {