File tree Expand file tree Collapse file tree 3 files changed +4
-26
lines changed Expand file tree Collapse file tree 3 files changed +4
-26
lines changed Original file line number Diff line number Diff line change 6
6
7
7
Update table configuration items, which will be automatically redrawn after being called.
8
8
9
- updateConfig parameter description:
10
-
11
- - keepData: When the new option does not pass in records or dataSource, whether to retain the original data. The default is false
12
-
13
9
``` ts
14
10
/**
15
11
*Update options currently only support full updates
16
12
* @param options
17
13
*/
18
- updateOption (options : BaseTableConstructorOptions ,updateConfig ?: {
19
- // When the new option does not pass in records or dataSource, whether to retain the original data. The default is false
20
- keepData?:boolean
21
- }) => void
14
+ updateOption (options : BaseTableConstructorOptions ) => void
22
15
```
23
16
24
17
If you need to update a single configuration item, please refer to the other ` update** ` interfaces below
Original file line number Diff line number Diff line change 6
6
7
7
更新表格配置项,调用后会自动重绘。
8
8
9
- updateConfig 参数说明:
10
-
11
- - keepData: 当新的option没有传入records或者dataSource时,是否保留原本的数据。默认为false
12
-
13
9
``` ts
14
10
/**
15
11
* 更新options 目前只支持全量更新
16
12
* @param options
17
13
*/
18
- updateOption (options : BaseTableConstructorOptions ,updateConfig ?: {
19
- // 当新的option没有传入records或者dataSource时,是否保留原本的数据
20
- keepData?:boolean
21
- }) => void
14
+ updateOption (options : BaseTableConstructorOptions ) => void
22
15
```
23
16
24
17
如果需要更新单个配置项,请参考下面其他` update** ` 接口
Original file line number Diff line number Diff line change @@ -478,15 +478,7 @@ export class ListTable extends BaseTable implements ListTableAPI {
478
478
}
479
479
return ifCan ;
480
480
}
481
- updateOption (
482
- options : ListTableConstructorOptions ,
483
- updateConfig : {
484
- //当新的option没有传入records或者dataSource时,是否保留原本的数据
485
- keepData ?: boolean ;
486
- } = {
487
- keepData : false
488
- }
489
- ) {
481
+ updateOption ( options : ListTableConstructorOptions ) {
490
482
const internalProps = this . internalProps ;
491
483
super . updateOption ( options ) ;
492
484
internalProps . frozenColDragHeaderMode =
@@ -525,7 +517,7 @@ export class ListTable extends BaseTable implements ListTableAPI {
525
517
if ( internalProps . releaseList ) {
526
518
for ( let i = internalProps . releaseList . length - 1 ; i >= 0 ; i -- ) {
527
519
const releaseObj = internalProps . releaseList [ i ] ;
528
- if ( updateConfig . keepData && releaseObj instanceof DataSource ) {
520
+ if ( releaseObj instanceof DataSource ) {
529
521
releaseObj . updateColumns ( this . internalProps . columns ) ;
530
522
} else {
531
523
releaseObj ?. release ?.( ) ;
You can’t perform that action at this time.
0 commit comments