Skip to content

Commit

Permalink
Merge pull request #1008 from VisActor/release/0.18.3
Browse files Browse the repository at this point in the history
[Auto release] release 0.18.3
  • Loading branch information
fangsmile authored Jan 25, 2024
2 parents d5216e1 + cc13ea0 commit ac61354
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 18 deletions.
2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"0.18.2","mainProject":"@visactor/vtable","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"0.18.3","mainProject":"@visactor/vtable","nextBump":"patch"}]
12 changes: 6 additions & 6 deletions docs/assets/guide/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,35 +338,35 @@
"path": "custom_icon",
"title": {
"zh": "自定义icon",
"en": "custom_icon"
"en": "custom icon"
}
},
{
"path": "custom_layout",
"title": {
"zh": "单元格自定义布局",
"en": "custom_layout"
"zh": "单元格自定义渲染(JSX)",
"en": "custom render(JSX)"
}
},
{
"path": "custom_render",
"title": {
"zh": "单元格自定义渲染",
"en": "custom_render"
"en": "custom render"
}
},
{
"path": "custom_component",
"title": {
"zh": "自定义交互组件",
"en": "custom_interactive_component"
"en": "custom interactive component"
}
},
{
"path": "custom_merge",
"title": {
"zh": "自定义单元格合并",
"en": "custom_merge"
"en": "custom merge"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion packages/react-vtable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vtable",
"version": "0.18.2",
"version": "0.18.3",
"description": "The react version of VTable",
"keywords": [
"react",
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable-editors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vtable-editors",
"version": "0.18.2",
"version": "0.18.3",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable-export/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vtable-export",
"version": "0.18.2",
"version": "0.18.3",
"description": "The export util of VTable",
"author": {
"name": "VisActor",
Expand Down
12 changes: 12 additions & 0 deletions packages/vtable/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@visactor/vtable",
"entries": [
{
"version": "0.18.3",
"tag": "@visactor/vtable_v0.18.3",
"date": "Thu, 25 Jan 2024 10:27:02 GMT",
"comments": {
"none": [
{
"comment": "fix: click outside of cells click cancel select state\n\n"
}
]
}
},
{
"version": "0.18.2",
"tag": "@visactor/vtable_v0.18.2",
Expand Down
11 changes: 10 additions & 1 deletion packages/vtable/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Change Log - @visactor/vtable

This log was last generated on Wed, 24 Jan 2024 12:12:36 GMT and should not be manually modified.
This log was last generated on Thu, 25 Jan 2024 10:27:02 GMT and should not be manually modified.

## 0.18.3
Thu, 25 Jan 2024 10:27:02 GMT

### Updates

- fix: click outside of cells click cancel select state



## 0.18.2
Wed, 24 Jan 2024 12:12:36 GMT
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vtable",
"version": "0.18.2",
"version": "0.18.3",
"description": "canvas table width high performance",
"keywords": [
"grid",
Expand Down
7 changes: 7 additions & 0 deletions packages/vtable/src/edit/edit-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,11 @@ export class EditManeger {
this.editingEditor = null;
}
}

cancelEdit() {
if (this.editingEditor) {
this.editingEditor.exit();
this.editingEditor = null;
}
}
}
5 changes: 1 addition & 4 deletions packages/vtable/src/event/listener/container-dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ export function bindContainerDomListener(eventManager: EventManager) {
}
}
} else if (e.key === 'Escape') {
if ((table as ListTableAPI).editorManager.editingEditor) {
(table as ListTableAPI).editorManager.editingEditor.exit();
(table as ListTableAPI).editorManager.editingEditor = null;
}
(table as ListTableAPI).editorManager.cancelEdit();
} else if (e.key === 'Enter') {
// 如果按enter键 可以结束当前的编辑 或开启编辑选中的单元格(仅限单选)
if ((table as ListTableAPI).editorManager.editingEditor) {
Expand Down
4 changes: 2 additions & 2 deletions packages/vtable/src/event/listener/table-group.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IEventTarget, INode } from '@src/vrender';
import type { IEventTarget } from '@src/vrender';
import { Gesture, type FederatedPointerEvent } from '@src/vrender';
import type {
ListTableAPI,
Expand Down Expand Up @@ -625,7 +625,7 @@ export function bindTableGroupListener(eventManager: EventManager) {
// 如果是鼠标点击到canvas空白区域 则取消选中状态
!table.eventManager.isDraging &&
target &&
target.isDescendantsOf(table.scenegraph.stage) && //防止已经被删除掉了
(target.isDescendantsOf(table.scenegraph.stage) || (target as any).stage === target) && //判断节点未被删除 后面这个是为了判断是stage本身
!target.isDescendantsOf(table.scenegraph.tableGroup)
// &&
// (target as any) !== table.scenegraph.tableGroup &&
Expand Down
5 changes: 5 additions & 0 deletions packages/vtable/src/ts-types/base-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,11 @@ export interface BaseTableAPI {
getBodyIndexByTableIndex: (col: number, row: number) => CellAddress;
/** 根据body部分的列索引及行索引,获取单元格的行列号 */
getTableIndexByBodyIndex: (col: number, row: number) => CellAddress;
/**
* 滚动到具体某个单元格位置
* @param cellAddr 要滚动到的单元格位置
*/
scrollToCell: (cellAddr: { col?: number; row?: number }) => void;
}
export interface ListTableProtected extends IBaseTableProtected {
/** 表格数据 */
Expand Down

0 comments on commit ac61354

Please sign in to comment.