11import { default as Table , TableProps , ColumnType } from "antd/es/table" ;
2- import { TableCellContext , TableRowContext } from "comps/comps/tableComp /tableContext" ;
3- import { TableToolbar } from "comps/comps/tableComp /tableToolbarComp" ;
4- import { RowColorViewType , RowHeightViewType , TableEventOptionValues } from "comps/comps/tableComp /tableTypes" ;
2+ import { TableCellContext , TableRowContext } from "comps/comps/tableLiteComp /tableContext" ;
3+ import { TableToolbar } from "comps/comps/tableLiteComp /tableToolbarComp" ;
4+ import { RowColorViewType , RowHeightViewType , TableEventOptionValues } from "comps/comps/tableLiteComp /tableTypes" ;
55import {
66 COL_MIN_WIDTH ,
77 COLUMN_CHILDREN_KEY ,
@@ -12,7 +12,7 @@ import {
1212 onTableChange ,
1313 RecordType ,
1414 supportChildrenTree ,
15- } from "comps/comps/tableComp /tableUtils" ;
15+ } from "comps/comps/tableLiteComp /tableUtils" ;
1616import {
1717 handleToHoverRow ,
1818 handleToSelectedRow ,
@@ -870,14 +870,12 @@ export const TableCompView = React.memo((props: {
870870 const size = useMemo ( ( ) => compChildren . size . getView ( ) , [ compChildren . size ] ) ;
871871 const editModeClicks = useMemo ( ( ) => compChildren . editModeClicks . getView ( ) , [ compChildren . editModeClicks ] ) ;
872872 const onEvent = useMemo ( ( ) => compChildren . onEvent . getView ( ) , [ compChildren . onEvent ] ) ;
873- const currentExpandedRows = useMemo ( ( ) => compChildren . currentExpandedRows . getView ( ) , [ compChildren . currentExpandedRows ] ) ;
874873 const dynamicColumn = compChildren . dynamicColumn . getView ( ) ;
875874 const dynamicColumnConfig = useMemo (
876875 ( ) => compChildren . dynamicColumnConfig . getView ( ) ,
877876 [ compChildren . dynamicColumnConfig ]
878877 ) ;
879878 const columnsAggrData = comp . columnAggrData ;
880- const expansion = useMemo ( ( ) => compChildren . expansion . getView ( ) , [ compChildren . expansion ] ) ;
881879 const antdColumns = useMemo (
882880 ( ) =>
883881 columnsToAntdFormat (
@@ -970,17 +968,7 @@ export const TableCompView = React.memo((props: {
970968 updateEmptyRows ( ) ;
971969 } , [ updateEmptyRows ] ) ;
972970
973- useUpdateEffect ( ( ) => {
974- if ( ! isEqual ( currentExpandedRows , expandedRowKeys ) ) {
975- compChildren . currentExpandedRows . dispatchChangeValueAction ( expandedRowKeys ) ;
976- }
977- } , [ expandedRowKeys ] ) ;
978971
979- useUpdateEffect ( ( ) => {
980- if ( ! isEqual ( currentExpandedRows , expandedRowKeys ) ) {
981- setExpandedRowKeys ( currentExpandedRows ) ;
982- }
983- } , [ currentExpandedRows ] ) ;
984972
985973 const pageDataInfo = useMemo ( ( ) => {
986974 // Data pagination
@@ -1032,7 +1020,7 @@ export const TableCompView = React.memo((props: {
10321020 total : pageDataInfo . total ,
10331021 current : pageDataInfo . current ,
10341022 } }
1035- columns = { columns }
1023+ columns = { columns as any }
10361024 onRefresh = { ( ) =>
10371025 onRefresh (
10381026 editorState . queryCompInfoList ( ) . map ( ( info ) => info . name ) ,
@@ -1062,7 +1050,6 @@ export const TableCompView = React.memo((props: {
10621050 tableSize = { size }
10631051 istoolbarPositionBelow = { toolbar . position === "below" }
10641052 multiSelectEnabled = { compChildren . selection . children . mode . value === 'multiple' }
1065- expandableRows = { Boolean ( expansion . expandModalView ) }
10661053 summaryRows = { parseInt ( summaryRows ) }
10671054 columns = { columns }
10681055 summaryRowStyle = { summaryRowStyle }
@@ -1119,31 +1106,12 @@ export const TableCompView = React.memo((props: {
11191106 $showHRowGridBorder = { showHRowGridBorder }
11201107 >
11211108 < ResizeableTable < RecordType >
1122- expandable = { {
1123- ...expansion . expandableConfig ,
1124- childrenColumnName : supportChildren
1125- ? COLUMN_CHILDREN_KEY
1126- : "OB_CHILDREN_KEY_PLACEHOLDER" ,
1127- fixed : "left" ,
1128- onExpand : ( expanded ) => {
1129- if ( expanded ) {
1130- handleChangeEvent ( 'rowExpand' )
1131- } else {
1132- handleChangeEvent ( 'rowShrink' )
1133- }
1134- } ,
1135- onExpandedRowsChange : ( expandedRowKeys ) => {
1136- setExpandedRowKeys ( expandedRowKeys as unknown as string [ ] ) ;
1137- } ,
1138- expandedRowKeys : expandedRowKeys ,
1139- } }
1140- // rowKey={OB_ROW_ORI_INDEX}
11411109 rowColorFn = { compChildren . rowColor . getView ( ) as any }
11421110 rowHeightFn = { compChildren . rowHeight . getView ( ) as any }
11431111 { ...compChildren . selection . getView ( ) ( onEvent ) }
11441112 bordered = { compChildren . showRowGridBorder . getView ( ) }
11451113 onChange = { ( pagination , filters , sorter , extra ) => {
1146- onTableChange ( pagination , filters , sorter , extra , comp . dispatch , onEvent ) ;
1114+ onTableChange ( pagination , filters , sorter , extra , comp . dispatch , onEvent as any ) ;
11471115 } }
11481116 showHeader = { ! compChildren . hideHeader . getView ( ) }
11491117 columns = { antdColumns }
@@ -1163,9 +1131,6 @@ export const TableCompView = React.memo((props: {
11631131 } }
11641132 summary = { summaryView }
11651133 />
1166- < SlotConfigContext . Provider value = { { modalWidth : width && Math . max ( width , 300 ) } } >
1167- { expansion . expandModalView }
1168- </ SlotConfigContext . Provider >
11691134 </ TableWrapper >
11701135 </ ScrollBar >
11711136 { toolbar . position === "below" && ! hideToolbar && ( toolbar . fixedToolbar || ( tableAutoHeight && showHorizontalScrollbar ) ) && toolbarView }
0 commit comments