File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1757,6 +1757,15 @@ End editing
17571757 completeEditCell: () => void;
17581758```
17591759
1760+ ## cancelEditCell(Function)
1761+
1762+ Cancel editing without saving any changes
1763+
1764+ ```
1765+ /** Cancel editing */
1766+ cancelEditCell: () => void;
1767+ ```
1768+
17601769## records
17611770
17621771Get all data of the current table
Original file line number Diff line number Diff line change @@ -1759,6 +1759,15 @@ const rowImage = tableInstance.exportCellRangeImg(rowRange);
17591759 completeEditCell: () => void;
17601760```
17611761
1762+ ## cancelEditCell(Function)
1763+
1764+ 取消编辑,不保存任何更改
1765+
1766+ ```
1767+ /** 取消编辑 */
1768+ cancelEditCell: () => void;
1769+ ```
1770+
17621771## records
17631772
17641773获取当前表格的全部数据
Original file line number Diff line number Diff line change @@ -317,6 +317,8 @@ interface ListTableAPI {
317317 startEditCell : (col ?: number , row ?: number , value ?: string | number ) => void ;
318318 /** End editing */
319319 completeEditCell : () => void ;
320+ /** Cancel editing */
321+ cancelEditCell : () => void ;
320322 // ...
321323}
322324` ` `
Original file line number Diff line number Diff line change @@ -318,6 +318,8 @@ interface ListTableAPI {
318318 startEditCell: (col ? : number , row ? : number , value ? : string | number ) => void ;
319319 /** 结束编辑 */
320320 completeEditCell: () => void ;
321+ /** 取消编辑 */
322+ cancelEditCell: () => void ;
321323 // ...
322324}
323325```
Original file line number Diff line number Diff line change @@ -1530,6 +1530,10 @@ export class ListTable extends BaseTable implements ListTableAPI {
15301530 completeEditCell ( ) {
15311531 this . editorManager . completeEdit ( ) ;
15321532 }
1533+ /** 取消编辑 */
1534+ cancelEditCell ( ) {
1535+ this . editorManager . cancelEdit ( ) ;
1536+ }
15331537 /** 获取单元格对应的编辑器 */
15341538 getEditor ( col : number , row : number ) {
15351539 const lastSelectedCellEditor = this . editorManager . cacheLastSelectedCellEditor [ `${ col } -${ row } ` ] ;
Original file line number Diff line number Diff line change @@ -1753,6 +1753,10 @@ export class PivotTable extends BaseTable implements PivotTableAPI {
17531753 completeEditCell ( ) {
17541754 this . editorManager . completeEdit ( ) ;
17551755 }
1756+ /** 取消编辑 */
1757+ cancelEditCell ( ) {
1758+ this . editorManager . cancelEdit ( ) ;
1759+ }
17561760 /** 获取单元格对应的编辑器 */
17571761 getEditor ( col : number , row : number ) {
17581762 const lastSelectedCellEditor = this . editorManager . cacheLastSelectedCellEditor [ `${ col } -${ row } ` ] ;
Original file line number Diff line number Diff line change @@ -387,6 +387,8 @@ export interface ListTableAPI extends BaseTableAPI {
387387 startEditCell : ( col ?: number , row ?: number , value ?: string | number ) => void ;
388388 /** 结束编辑 */
389389 completeEditCell : ( ) => void ;
390+ /** 取消编辑 */
391+ cancelEditCell : ( ) => void ;
390392 //#endregion
391393 addRecord : ( record : any , recordIndex ?: number ) => void ;
392394 addRecords : ( records : any [ ] , recordIndex ?: number ) => void ;
You can’t perform that action at this time.
0 commit comments