@@ -67,7 +67,6 @@ export class TableRow<
6767 moved : boolean ;
6868 depth : number ;
6969 expandable : boolean ;
70- appeard ?: boolean ;
7170 loading ?: boolean ;
7271 error ?: string ;
7372 checkdisable : boolean ;
@@ -205,7 +204,6 @@ export class TableRow<
205204 moved,
206205 depth,
207206 expandable,
208- appeard,
209207 checkdisable,
210208 trRef,
211209 isNested,
@@ -263,28 +261,22 @@ export class TableRow<
263261 </ th >
264262 ) : null }
265263
266- { appeard ? (
267- renderCell (
268- `${ regionPrefix } ${ itemIndex } /${ column . index } ` ,
269- column ,
270- item ,
271- {
272- ...rest ,
273- width : null ,
274- rowIndex : itemIndex ,
275- rowIndexPath : item . path ,
276- colIndex : column . index ,
277- rowPath,
278- key : column . id ,
279- onAction : this . handleAction ,
280- onQuickChange : this . handleQuickChange ,
281- onChange : this . handleChange
282- }
283- )
284- ) : (
285- < td key = { column . id } >
286- < div className = { cx ( 'Table-emptyBlock' ) } > </ div >
287- </ td >
264+ { renderCell (
265+ `${ regionPrefix } ${ itemIndex } /${ column . index } ` ,
266+ column ,
267+ item ,
268+ {
269+ ...rest ,
270+ width : null ,
271+ rowIndex : itemIndex ,
272+ rowIndexPath : item . path ,
273+ colIndex : column . index ,
274+ rowPath,
275+ key : column . id ,
276+ onAction : this . handleAction ,
277+ onQuickChange : this . handleQuickChange ,
278+ onChange : this . handleChange
279+ }
288280 ) }
289281 </ tr >
290282 ) ) }
@@ -331,23 +323,17 @@ export class TableRow<
331323 { ...testIdBuilder ?.( rowPath ) ?. getTestId ( ) }
332324 >
333325 { columns . map ( column =>
334- appeard ? (
335- renderCell ( `${ itemIndex } /${ column . index } ` , column , item , {
336- ...rest ,
337- rowIndex : itemIndex ,
338- colIndex : column . index ,
339- rowIndexPath : item . path ,
340- rowPath,
341- key : column . id ,
342- onAction : this . handleAction ,
343- onQuickChange : this . handleQuickChange ,
344- onChange : this . handleChange
345- } )
346- ) : column . name && item . rowSpans [ column . name ] === 0 ? null : (
347- < td key = { column . id } >
348- < div className = { cx ( 'Table-emptyBlock' ) } > </ div >
349- </ td >
350- )
326+ renderCell ( `${ itemIndex } /${ column . index } ` , column , item , {
327+ ...rest ,
328+ rowIndex : itemIndex ,
329+ colIndex : column . index ,
330+ rowIndexPath : item . path ,
331+ rowPath,
332+ key : column . id ,
333+ onAction : this . handleAction ,
334+ onQuickChange : this . handleQuickChange ,
335+ onChange : this . handleChange
336+ } )
351337 ) }
352338 </ tr >
353339 ) ;
@@ -364,16 +350,9 @@ export default observer((props: TableRowProps) => {
364350 store . canAccessSuperData ||
365351 columns . some ( item => item . pristine . canAccessSuperData ) ;
366352
367- const { ref, inView} = useInView ( {
368- threshold : 0 ,
369- onChange : item . markAppeared ,
370- skip : ! item . lazyRender
371- } ) ;
372-
373353 return (
374354 < TableRow
375355 { ...props }
376- trRef = { ref }
377356 expanded = { item . expanded }
378357 parentExpanded = { parent ?. expanded }
379358 id = { item . id }
@@ -391,7 +370,6 @@ export default observer((props: TableRowProps) => {
391370 // data 在 TableRow 里面没有使用,这里写上是为了当列数据变化的时候 TableRow 重新渲染,
392371 // 不是 item.locals 的原因是 item.locals 会变化多次,比如父级上下文变化也会进来,但是 item.data 只会变化一次。
393372 data = { canAccessSuperData ? item . locals : item . data }
394- appeard = { item . lazyRender ? item . appeared || inView : true }
395373 isNested = { store . isNested }
396374 />
397375 ) ;
0 commit comments