@@ -53,15 +53,15 @@ import {
53
53
import { saveDataAsFile } from "util/fileUtils" ;
54
54
import { JSONObject , JSONValue } from "util/jsonTypes" ;
55
55
import { lastValueIfEqual , shallowEqual } from "util/objectUtils" ;
56
- import { IContainer } from "../containerBase" ;
56
+
57
57
import { getSelectedRowKeys } from "./selectionControl" ;
58
58
import { compTablePropertyView } from "./tablePropertyView" ;
59
59
import { RowColorComp , RowHeightComp , SortValue , TableChildrenView , TableInitComp } from "./tableTypes" ;
60
60
61
61
import { useContext , useState } from "react" ;
62
62
import { EditorContext } from "comps/editorState" ;
63
63
64
- export class TableImplComp extends TableInitComp implements IContainer {
64
+ export class TableImplComp extends TableInitComp {
65
65
private prevUnevaledValue ?: string ;
66
66
readonly filterData : RecordType [ ] = [ ] ;
67
67
readonly columnAggrData : ColumnsAggrData = { } ;
@@ -73,29 +73,6 @@ export class TableImplComp extends TableInitComp implements IContainer {
73
73
getTableAutoHeight ( ) {
74
74
return this . children . autoHeight . getView ( ) ;
75
75
}
76
-
77
- private getSlotContainer ( ) {
78
- return this . children . expansion . children . slot . getSelectedComp ( ) . getComp ( ) . children . container ;
79
- }
80
-
81
- findContainer ( key : string ) {
82
- return this . getSlotContainer ( ) . findContainer ( key ) ;
83
- }
84
-
85
- getCompTree ( ) {
86
- return this . getSlotContainer ( ) . getCompTree ( ) ;
87
- }
88
-
89
- getPasteValue ( nameGenerator : NameGenerator ) {
90
- return {
91
- ...this . toJsonValue ( ) ,
92
- expansion : this . children . expansion . getPasteValue ( nameGenerator ) ,
93
- } ;
94
- }
95
-
96
- realSimpleContainer ( key ?: string ) {
97
- return this . getSlotContainer ( ) . realSimpleContainer ( key ) ;
98
- }
99
76
100
77
downloadData ( fileName : string ) {
101
78
saveDataAsFile ( {
@@ -256,21 +233,6 @@ export class TableImplComp extends TableInitComp implements IContainer {
256
233
) ;
257
234
needMoreEval = true ;
258
235
}
259
-
260
- let params = comp . children . expansion . children . slot . getCachedParams ( newSelection ) ;
261
- if ( selectionChanged || _ . isNil ( params ) || dataChanged ) {
262
- params =
263
- _ . isNil ( params ) || dataChanged
264
- ? genSelectionParams ( comp . filterData , newSelection )
265
- : undefined ;
266
- comp = comp . setChild (
267
- "expansion" ,
268
- comp . children . expansion . reduce (
269
- comp . children . expansion . setSelectionAction ( newSelection , params )
270
- )
271
- ) ;
272
- needMoreEval = true ;
273
- }
274
236
if ( action . type === CompActionTypes . UPDATE_NODES_V2 && needMoreEval ) {
275
237
setTimeout ( ( ) => comp . dispatch ( onlyEvalAction ( ) ) ) ;
276
238
}
@@ -724,24 +686,6 @@ TableTmpComp = withMethodExposing(TableTmpComp, [
724
686
comp . children . columns . dispatchClearInsertSet ( ) ;
725
687
} ,
726
688
} ,
727
- {
728
- method : {
729
- name : "setExpandedRows" ,
730
- description : "" ,
731
- params : [
732
- { name : "expandedRows" , type : "arrayString" } ,
733
- ] ,
734
- } ,
735
- execute : ( comp , values ) => {
736
- const expandedRows = values [ 0 ] ;
737
- if ( ! isArray ( expandedRows ) ) {
738
- return Promise . reject ( "setExpandedRows function only accepts array of string i.e. ['1', '2', '3']" )
739
- }
740
- if ( expandedRows && isArray ( expandedRows ) ) {
741
- comp . children . currentExpandedRows . dispatchChangeValueAction ( expandedRows as string [ ] ) ;
742
- }
743
- } ,
744
- }
745
689
] ) ;
746
690
747
691
// exposing data
@@ -996,24 +940,5 @@ export const TableLiteComp = withExposingConfigs(TableTmpComp, [
996
940
} ,
997
941
trans ( "table.selectedCellDesc" )
998
942
) ,
999
- depsConfig ( {
1000
- name : "currentExpandedRow" ,
1001
- desc : trans ( "table.sortDesc" ) ,
1002
- depKeys : [ "currentExpandedRows" ] ,
1003
- func : ( input ) => {
1004
- if ( input . currentExpandedRows . length > 0 ) {
1005
- return input . currentExpandedRows [ input . currentExpandedRows . length - 1 ] ;
1006
- }
1007
- return "" ;
1008
- } ,
1009
- } ) ,
1010
- depsConfig ( {
1011
- name : "currentExpandedRows" ,
1012
- desc : trans ( "table.sortDesc" ) ,
1013
- depKeys : [ "currentExpandedRows" ] ,
1014
- func : ( input ) => {
1015
- return input . currentExpandedRows ;
1016
- } ,
1017
- } ) ,
1018
943
new NameConfig ( "data" , trans ( "table.dataDesc" ) ) ,
1019
944
] ) ;
0 commit comments