Reactjs 度量值未在react虚拟化中查看rest数据

Reactjs 度量值未在react虚拟化中查看rest数据,reactjs,react-virtualized,Reactjs,React Virtualized,当组件安装时,度量值显示某些项目,但当我滚动浏览器时,项目的其余部分不显示,但度量值高度增加,项目的其余部分隐藏 // Default sizes help Masonry decide how many images to batch-measure cache:any = new CellMeasurerCache({ defaultHeight: 250, defaultWidth: 200, fixedWidth: false, }); // Our

当组件安装时,度量值显示某些项目,但当我滚动浏览器时,项目的其余部分不显示,但度量值高度增加,项目的其余部分隐藏

// Default sizes help Masonry decide how many images to batch-measure
  cache:any = new CellMeasurerCache({
    defaultHeight: 250,
    defaultWidth: 200,
    fixedWidth: false,

  });
  // Our masonry layout will use 3 columns with a 10px gutter between
  cellPositioner:any = createMasonryCellPositioner({
    cellMeasurerCache: this.cache,
    columnCount: 6,
    columnWidth: 200,
    spacer: 20,
  });
  cellRenderer = ({index, key, parent, style}:any) => {
    const list:any = this.state.styleFilteration;

    return (
      <CellMeasurer cache={this.cache} index={index} key={key} parent={parent}>

      <this.Text  style={style}  >   
        <this.Image onClick={()=> this.setState({show: true,forDetails: list[index]})}  >
           {list[index].favorite_beers.length == 0 ?
           <this.unFaverit  onClick={(e)=> {e.stopPropagation(); this.fav(list[index].id)}} ><i className="fa fa-heart"></i></this.unFaverit> :
           <this.Faverit onClick={(e)=> {e.stopPropagation(); this.unFav(list[index].id)} } ><i className="fa fa-heart"></i></this.Faverit>}
           </this.Image>
           <this.ImageName >{list[index].title}</this.ImageName>
       </this.Text>

      </CellMeasurer>
    );
  }
//默认大小有助于确定要批量测量的图像数量
cache:any=新的CellMeasureCache({
默认高度:250,
默认宽度:200,
fixedWidth:false,
});
//我们的砌体布局将使用3根柱子,中间有一个10px的排水沟
cellPositioner:any=createMasonryCellPositioner({
CellMeasureCache:this.cache,
列数:6,
列宽:200,
间隔:20,
});
cellRenderer=({index,key,parent,style}:any)=>{
const list:any=this.state.styleFilteration;
返回(
this.setState({show:true,forDetails:list[index]})}>
{list[index]。最喜爱的啤酒。长度==0?
{e.stopPropagation();this.fav(list[index].id)}>:
{e.stopPropagation();this.unav(list[index].id)}
{list[index].title}
);
}
还有我的报税表

<Masonry
   cellCount={this.state.styleFilteration.length}
   cellMeasurerCache={this.cache}
   cellPositioner={this.cellPositioner}
   cellRenderer={this.cellRenderer}
   height={800}
   width={1300}
   autoHeight
   data={this.state.styleFilteration}

/>


我认为
自动高度
数据
不需要
砖石
上的道具。你试过移除那些道具吗?我认为
autoHeight
仅在您同时使用
WindowScroller
时才需要。如果我删除了autoHeight,则会出现错误:需要autoHeight,我认为
autoHeight
砖石上的
数据
道具不需要。你试过移除那些道具吗?我认为只有在同时使用
WindowScroller
时才需要
autoHeight
。如果我删除autoHeight,它会给我一个错误:autoHeight是必需的