Skip to content

Commit

Permalink
docs: change startEditCell api
Browse files Browse the repository at this point in the history
  • Loading branch information
fangsmile committed Jul 16, 2024
1 parent a1a38f2 commit 2676d68
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions docs/assets/api/en/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -879,11 +879,13 @@ Get the editor for the cell configuration

## startEditCell(Function)

Enable cell editing
Enable cell editing.

If you want to change the value displayed in the edit box, you can configure the value to set the change

```
/** Enable cell editing */
startEditCell: (col?: number, row?: number) => void;
startEditCell: (col?: number, row?: number, value?: string | number) => void;
```

## completeEditCell(Function)
Expand Down
6 changes: 4 additions & 2 deletions docs/assets/api/zh/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -877,11 +877,13 @@ use case: 点击图例项后 更新过滤规则 来更新图表

## startEditCell(Function)

开启单元格编辑
开启单元格编辑。

如果想要改变显示到编辑框中的值 可以配置上 value 来设置改变

```
/** 开启单元格编辑 */
startEditCell: (col?: number, row?: number) => void;
startEditCell: (col?: number, row?: number, value?: string | number) => void;
```

## completeEditCell(Function)
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/guide/en/edit/edit_cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ interface ListTableAPI {
/** Get the editor of cell configuration */
getEditor: (col: number, row: number) => IEditor;
/** Enable cell editing */
startEditCell: (col?: number, row?: number) => void;
startEditCell: (col?: number, row?: number, value?: string | number) => void;
/** End editing */
completeEditCell: () => void;
// ...
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/guide/zh/edit/edit_cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ interface ListTableConstructorOptions {

如未定义该接口则编辑值值默认不做校验,接口返回 false,校验失败则保留在编辑状态;

若需要实现异步校验,可以返回一个Promise对象,该Promise对象在校验成功时以真值解析,校验失败时以假值解析。
若需要实现异步校验,可以返回一个 Promise 对象,该 Promise 对象在校验成功时以真值解析,校验失败时以假值解析。

## 9. 相关 api

Expand All @@ -296,7 +296,7 @@ interface ListTableAPI {
/** 获取单元格配置的编辑器 */
getEditor: (col: number, row: number) => IEditor;
/** 开启单元格编辑 */
startEditCell: (col?: number, row?: number) => void;
startEditCell: (col?: number, row?: number, value?: string | number) => void;
/** 结束编辑 */
completeEditCell: () => void;
// ...
Expand Down

0 comments on commit 2676d68

Please sign in to comment.