@@ -57,7 +57,6 @@ const getStyle = (
5757 const selectedRowBackground = genLinerGradient ( rowStyle . selectedRowBackground ) ;
5858 const hoverRowBackground = genLinerGradient ( rowStyle . hoverRowBackground ) ;
5959 const alternateBackground = genLinerGradient ( rowStyle . alternateBackground ) ;
60- // const tableAutoHeight =
6160
6261 return css `
6362 .ant-table-body {
@@ -123,7 +122,9 @@ const getStyle = (
123122 ` ;
124123} ;
125124
126- const TitleResizeHandle = styled . span `
125+ const TitleResizeHandle = styled . span < {
126+ $visibleResizables : boolean ;
127+ } > `
127128 position: absolute;
128129 top: 0;
129130 right: -5px;
@@ -135,10 +136,9 @@ const TitleResizeHandle = styled.span`
135136
136137const BackgroundWrapper = styled . div < {
137138 $style : TableStyleType ;
138- $tableAutoHeight ? : boolean ;
139+ $tableAutoHeight : boolean ;
139140} > `
140- ${ ( props ) => ! props . $tableAutoHeight && ` height: calc(100% - ${ props . $style . margin } - ${ props . $style . margin } ) !important` } ;
141- ${ ( props ) => props . $tableAutoHeight && ` height: calc(100% + ${ props . $style . margin } ` } ;
141+ ${ ( props ) => ! props . $tableAutoHeight && `height: calc(100% - ${ props . $style . margin } - ${ props . $style . margin } );` }
142142 background: ${ ( props ) => props . $style . background } !important;
143143 border: ${ ( props ) => `${ props . $style . borderWidth } solid ${ props . $style . border } !important` } ;
144144 border-radius: ${ ( props ) => props . $style . radius } !important;
@@ -435,7 +435,8 @@ const ResizeableTitle = (props: any) => {
435435 draggableOpts = { { enableUserSelectHack : false } }
436436 handle = { ( axis : ResizeHandleAxis , ref : ReactRef < HTMLDivElement > ) => (
437437 < TitleResizeHandle
438- ref = { ref }
438+ ref = { ref }
439+ $visibleResizables = { props . visibleResizables }
439440 onClick = { ( e ) => {
440441 e . preventDefault ( ) ;
441442 e . stopPropagation ( ) ;
@@ -451,6 +452,7 @@ const ResizeableTitle = (props: any) => {
451452type CustomTableProps < RecordType > = Omit < TableProps < RecordType > , "components" | "columns" > & {
452453 columns : CustomColumnType < RecordType > [ ] ;
453454 viewModeResizable : boolean ;
455+ visibleResizables : boolean ;
454456 rowColorFn : RowColorViewType ;
455457 rowHeightFn : RowHeightViewType ;
456458 columnsStyle : TableColumnStyleType ;
@@ -673,12 +675,13 @@ export function TableCompView(props: {
673675 const [ loading , setLoading ] = useState ( false ) ;
674676 const { comp, onDownload, onRefresh } = props ;
675677 const compChildren = comp . children ;
676- const tableAutoHeight = compChildren . autoHeight . getView ( ) ;
677678 const style = compChildren . style . getView ( ) ;
678679 const rowStyle = compChildren . rowStyle . getView ( ) ;
679680 const headerStyle = compChildren . headerStyle . getView ( ) ;
680681 const toolbarStyle = compChildren . toolbarStyle . getView ( ) ;
681682 const rowAutoHeight = compChildren . rowAutoHeight . getView ( ) ;
683+ const tableAutoHeight = comp . getTableAutoHeight ( ) ;
684+ const visibleResizables = compChildren . visibleResizables . getView ( ) ;
682685 const columnsStyle = compChildren . columnsStyle . getView ( ) ;
683686 const changeSet = useMemo ( ( ) => compChildren . columns . getChangeSet ( ) , [ compChildren . columns ] ) ;
684687 const hasChange = useMemo ( ( ) => ! _ . isEmpty ( changeSet ) , [ changeSet ] ) ;
@@ -785,11 +788,9 @@ export function TableCompView(props: {
785788 }
786789
787790 return (
788- < BackgroundColorContext . Provider value = { style . background } >
791+ < BackgroundColorContext . Provider value = { style . background } >
789792
790- < BackgroundWrapper ref = { ref } $style = { style }
791- $tableAutoHeight = { compChildren . autoHeight . getView ( ) }
792- >
793+ < BackgroundWrapper ref = { ref } $style = { style } $tableAutoHeight = { tableAutoHeight } >
793794 { toolbar . position === "above" && toolbarView }
794795 < TableWrapper
795796 $style = { style }
@@ -800,8 +801,6 @@ export function TableCompView(props: {
800801 $fixedHeader = { compChildren . fixedHeader . getView ( ) }
801802 $fixedToolbar = { toolbar . fixedToolbar && toolbar . position === 'above' }
802803 >
803-
804-
805804 < ResizeableTable < RecordType >
806805 expandable = { {
807806 ...expansion . expandableConfig ,
@@ -824,6 +823,7 @@ export function TableCompView(props: {
824823 columns = { antdColumns }
825824 columnsStyle = { columnsStyle }
826825 viewModeResizable = { compChildren . viewModeResizable . getView ( ) }
826+ visibleResizables = { compChildren . visibleResizables . getView ( ) }
827827 dataSource = { pageDataInfo . data }
828828 size = { compChildren . size . getView ( ) }
829829 rowAutoHeight = { rowAutoHeight }
0 commit comments