Skip to content

Commit

Permalink
Merge pull request #1568 from VisActor/fix/merge-conflicts
Browse files Browse the repository at this point in the history
Merge develop into dev/0.24.0
  • Loading branch information
Rui-Sun authored Apr 22, 2024
2 parents cfe1ae7 + 8bb8921 commit 22e7647
Show file tree
Hide file tree
Showing 35 changed files with 547 additions and 565 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "refactor: optimize performance when row tree node exceed 8000 nodes #1557\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: when resize window size the editor input size not match cell size #1559\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: fix multilines new line style #1531",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: fix cell group order in async data #1517",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: add skipCustomMerge in getCellValue() #1543",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}
4 changes: 2 additions & 2 deletions docs/assets/api/en/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ Clear the selection of all cells.

## getCellValue(Function)

Get cell display value
Get the cell display value. If used in the customMergeCell function, you need to pass in the skipCustomMerge parameter, otherwise an error will be reported.

```
/**
* Get the cell display value
*/
getCellValue(col: number, row: number): FieldData;
getCellValue(col: number, row: number, skipCustomMerge?: boolean): FieldData;
```

## getCellOriginValue(Function)
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/api/zh/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,13 @@ setRecords(records: Array<any>)

## getCellValue(Function)

获取单元格展示值
获取单元格展示值,如果在customMergeCell函数中使用,需要传入 skipCustomMerge 参数,否则会导致报错。

```
/**
* 获取单元格展示值
*/
getCellValue(col: number, row: number): FieldData;
getCellValue(col: number, row: number, skipCustomMerge?: boolean): FieldData;
```

## getCellOriginValue(Function)
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/demo-openinula/zh/usage/grammatical-tag.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
category: examples
group: usage
title: 使用完整option
title: 使用语法化标签
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/preview/react-default-new.png
order: 1-1
link: '../guide/Developer_Ecology/openinula'
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/demo-react/zh/usage/grammatical-tag.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
category: examples
group: usage
title: 使用完整option
title: 使用语法化标签
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/preview/react-default.png
order: 1-1
link: '../guide/Developer_Ecology/react'
Expand Down
23 changes: 0 additions & 23 deletions docs/assets/demo/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -1338,29 +1338,6 @@
}
}
]
},
{
"path": "react",
"title": {
"zh": "react",
"en": "react"
},
"children": [
{
"path": "table-option",
"title": {
"zh": "table-option",
"en": "table-option"
}
},
{
"path": "table-component",
"title": {
"zh": "table-component",
"en": "table-component"
}
}
]
}
]
}
98 changes: 0 additions & 98 deletions docs/assets/demo/zh/react/table-component.md

This file was deleted.

103 changes: 0 additions & 103 deletions docs/assets/demo/zh/react/table-option.md

This file was deleted.

11 changes: 7 additions & 4 deletions packages/vtable/src/ListTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,15 @@ export class ListTable extends BaseTable implements ListTableAPI {
}
}
/** 获取单元格展示值 */
getCellValue(col: number, row: number): FieldData {
getCellValue(col: number, row: number, skipCustomMerge?: boolean): FieldData {
if (col === -1 || row === -1) {
return null;
}
const customMergeText = this.getCustomMergeValue(col, row);
if (customMergeText) {
return customMergeText;
if (!skipCustomMerge) {
const customMergeText = this.getCustomMergeValue(col, row);
if (customMergeText) {
return customMergeText;
}
}
const table = this;
if (table.internalProps.layoutMap.isSeriesNumber(col, row)) {
Expand Down Expand Up @@ -373,6 +375,7 @@ export class ListTable extends BaseTable implements ListTableAPI {
internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode;
//分页配置
this.pagination = options.pagination;
internalProps.sortState = options.sortState;
internalProps.dataConfig = {}; // cloneDeep(options.dataConfig ?? {});
//更新protectedSpace
this.showHeader = options.showHeader ?? true;
Expand Down
10 changes: 6 additions & 4 deletions packages/vtable/src/PivotChart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,12 @@ export class PivotChart extends BaseTable implements PivotChartAPI {
// return dataValue;
// }

getCellValue(col: number, row: number): FieldData {
const customMergeText = this.getCustomMergeValue(col, row);
if (customMergeText) {
return customMergeText;
getCellValue(col: number, row: number, skipCustomMerge?: boolean): FieldData {
if (!skipCustomMerge) {
const customMergeText = this.getCustomMergeValue(col, row);
if (customMergeText) {
return customMergeText;
}
}
if (this.internalProps.layoutMap.isHeader(col, row)) {
if (
Expand Down
Loading

0 comments on commit 22e7647

Please sign in to comment.