Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 反应虚拟化无限滚动未正确渲染_Reactjs_Infinite Scroll_React Virtualized - Fatal编程技术网

Reactjs 反应虚拟化无限滚动未正确渲染

Reactjs 反应虚拟化无限滚动未正确渲染,reactjs,infinite-scroll,react-virtualized,Reactjs,Infinite Scroll,React Virtualized,我有一个组件,我想在其中列出数组中的数字。 我尝试实现react虚拟化无限卷轴,如本例所示: 我想我离解决方案很近了,但是我不明白为什么代码不起作用。你能帮助我吗?这是我的实际组件(我尽可能多地清洁它) import*as React from'React'; 常量数据测试=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]; 导出类EventsViewController扩

我有一个组件,我想在其中列出数组中的数字。 我尝试实现react虚拟化无限卷轴,如本例所示:

我想我离解决方案很近了,但是我不明白为什么代码不起作用。你能帮助我吗?这是我的实际组件(我尽可能多地清洁它)

import*as React from'React';
常量数据测试=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30];
导出类EventsViewController扩展React.Component{
建造师(道具){
超级(道具);
此.state={
阈值:10,
实际数据:[]
};
this.rowRenderer=this.rowRenderer.bind(this);
this.isRowloated=this.isRowloated.bind(this);
this.loadMoreRows=this.loadMoreRows.bind(this);
}
已加载公共IsRowload(参数:任意){
return!!this.state.actualData[param.index];
}
公共loadMoreRows(参数:any){
常量startIndex=param.startIndex;
const stopIndex=param.stopIndex;
常量数据加载=[];
for(设i=startIndex;i(
)}
);
}
}
您需要设置

rowCount={dataTest.length}
在列表组件中