@moda-grid/vue2 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DataGrid.vue +27 -6
- package/package.json +2 -2
package/dist/DataGrid.vue
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
formatAggregate,
|
|
27
27
|
gridThemeClasses,
|
|
28
28
|
gridThemeVars,
|
|
29
|
+
isInteractiveCellTarget,
|
|
29
30
|
logicalToDomScrollLeft,
|
|
30
31
|
readClipboardText,
|
|
31
32
|
writeClipboardText,
|
|
@@ -1931,6 +1932,10 @@ function onCellMouseDown(
|
|
|
1931
1932
|
col: ColumnDef,
|
|
1932
1933
|
) {
|
|
1933
1934
|
if (e.button !== 0 || isEditingCell(rowIndex, colIndex)) return;
|
|
1935
|
+
// 인터랙티브 자식(체크박스·select·버튼·링크 등)은 건드리지 않는다 —
|
|
1936
|
+
// preventDefault가 select 네이티브 드롭다운을 죽이고, setActiveCell의
|
|
1937
|
+
// 리렌더가 자식의 click/change를 소실시킨다 (vanilla와 같은 가드)
|
|
1938
|
+
if (isInteractiveCellTarget(e.target)) return;
|
|
1934
1939
|
// fullRow — 편집 행 안 클릭은 커밋/선택 변경 없이 통과
|
|
1935
1940
|
if (
|
|
1936
1941
|
state.value.editType === "fullRow" &&
|
|
@@ -1954,7 +1959,13 @@ function onCellMouseEnter(rowIndex: number, colIndex: number) {
|
|
|
1954
1959
|
suppressCellClick = true;
|
|
1955
1960
|
grid.extendSelectionTo(rowIndex, colIndex);
|
|
1956
1961
|
}
|
|
1957
|
-
function onCellClick(rowIndex: number, colIndex: number) {
|
|
1962
|
+
function onCellClick(e: MouseEvent, rowIndex: number, colIndex: number) {
|
|
1963
|
+
// 인터랙티브 자식의 click은 셀 클릭으로 처리하지 않는다 — vanilla는
|
|
1964
|
+
// mousedown 가드로 pendingCellClick 자체가 안 세워져 같은 결과다
|
|
1965
|
+
if (isInteractiveCellTarget(e.target)) {
|
|
1966
|
+
suppressCellClick = false;
|
|
1967
|
+
return;
|
|
1968
|
+
}
|
|
1958
1969
|
if (!suppressCellClick) {
|
|
1959
1970
|
grid.setActiveCell(rowIndex, colIndex);
|
|
1960
1971
|
grid.trySingleClickEdit(rowIndex, colIndex);
|
|
@@ -1962,6 +1973,11 @@ function onCellClick(rowIndex: number, colIndex: number) {
|
|
|
1962
1973
|
suppressCellClick = false;
|
|
1963
1974
|
grid.notifyCellEvent("cellClick", rowIndex, colIndex);
|
|
1964
1975
|
}
|
|
1976
|
+
function onCellDblClick(e: MouseEvent, rowIndex: number, colIndex: number) {
|
|
1977
|
+
if (isInteractiveCellTarget(e.target)) return;
|
|
1978
|
+
grid.notifyCellEvent("cellDblClick", rowIndex, colIndex);
|
|
1979
|
+
grid.startEditing(rowIndex, colIndex);
|
|
1980
|
+
}
|
|
1965
1981
|
|
|
1966
1982
|
function editorContext(rowIndex: number, colIndex: number) {
|
|
1967
1983
|
return grid.getEditorContext(rowIndex, colIndex) as CellEditorContext;
|
|
@@ -2969,14 +2985,19 @@ watch(
|
|
|
2969
2985
|
@mouseenter="
|
|
2970
2986
|
onCellMouseEnter(entryIndexOf(entry, rowIdx), colIndex)
|
|
2971
2987
|
"
|
|
2972
|
-
@click="
|
|
2988
|
+
@click="
|
|
2989
|
+
onCellClick(
|
|
2990
|
+
$event,
|
|
2991
|
+
entryIndexOf(entry, rowIdx),
|
|
2992
|
+
colIndex,
|
|
2993
|
+
)
|
|
2994
|
+
"
|
|
2973
2995
|
@dblclick="
|
|
2974
|
-
|
|
2975
|
-
|
|
2996
|
+
onCellDblClick(
|
|
2997
|
+
$event,
|
|
2976
2998
|
entryIndexOf(entry, rowIdx),
|
|
2977
2999
|
colIndex,
|
|
2978
|
-
)
|
|
2979
|
-
grid.startEditing(entryIndexOf(entry, rowIdx), colIndex);
|
|
3000
|
+
)
|
|
2980
3001
|
"
|
|
2981
3002
|
@contextmenu="
|
|
2982
3003
|
onCellContextMenu($event, entryIndexOf(entry, rowIdx), col)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moda-grid/vue2",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Vue 2.7 adapter for @moda-grid — DataGrid SFC and useGrid composable",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"grid"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@moda-grid/core": "2.1.
|
|
39
|
+
"@moda-grid/core": "2.1.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"vue": "^2.7.0"
|