File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed
Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -325,9 +325,6 @@ export abstract class SpreadSheet extends EE {
325325 public setDataCfg ( dataCfg : S2DataConfig ) {
326326 this . store . set ( 'originalDataCfg' , dataCfg ) ;
327327 const newDataCfg = clone ( dataCfg ) ;
328- const lastSortParam = this . store . get ( 'sortParam' ) ;
329- const { sortParams } = newDataCfg ;
330- newDataCfg . sortParams = [ ] . concat ( lastSortParam || [ ] , sortParams || [ ] ) ;
331328 this . dataCfg = getSafetyDataConfig ( newDataCfg ) ;
332329 // clear value ranger after each updated data cfg
333330 clearValueRangeState ( this ) ;
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import {
1212 ThemeCfg ,
1313 ViewMeta ,
1414 LayoutResult ,
15- TableSortParams ,
1615 SortParams ,
1716} from '@antv/s2' ;
1817import React from 'react' ;
@@ -99,7 +98,7 @@ export interface BaseSheetComponentProps {
9998 header ?: HeaderCfgProps ;
10099 onLoad ?: ( ) => void ;
101100 onDestroy ?: ( ) => void ;
102- onListSortChange ?: ( params : TableSortParams | SortParams ) => void ;
101+ onSortChange ?: ( params : SortParams ) => void ;
103102 onRowColLayout ?: ( rows : LayoutRow [ ] , cols : LayoutCol [ ] ) => void ;
104103 onAfterHeaderLayout ?: ( layoutResult : LayoutResult ) => void ;
105104 onCollapseRows ?: ( collapsedRows : Record < string , boolean > ) => void ;
Original file line number Diff line number Diff line change @@ -119,8 +119,8 @@ export function useEvents(props: BaseSheetComponentProps) {
119119 } ,
120120
121121 // ============== sort ====================
122- [ S2Event . RANGE_SORT ] : ( value : TableSortParams | SortParams ) => {
123- props . onListSortChange ?.( value ) ;
122+ [ S2Event . RANGE_SORT ] : ( value : SortParams ) => {
123+ props . onSortChange ?.( value ) ;
124124 } ,
125125 } ;
126126
You can’t perform that action at this time.
0 commit comments