[英]react-virtualized arrowkeystepper table
我的問題是在ArrowKeyStepper中。 它對我不起作用。 我嘗試按鍵盤按鈕,但沒有任何效果。 鏈接到此處的文檔react-virtualized
<ArrowKeyStepper
columnCount={1}
rowCount={data.length}
mode="cells"
>
{({ onSectionRendered, scrollToRow }) => {
return (
<Table
onRowsRendered={({ startIndex, stopIndex }) => {
onSectionRendered({
rowStartIndex: startIndex,
rowStopIndex: stopIndex
});
}}
scrollToRow={scrollToRow}
rowCount={data.length}
rowGetter={({ index }) => data[index]}
>
// Column here
</Table>
);
}}
</ArrowKeyStepper>
我試圖找到答案,但是沒有用。
使用Table,您可以嘗試使用scrollToIndex,然后傳遞表項的索引,而不是使用ArrowKeyStepper。
const {index} = this.props
return (
<Table
onRowsRendered={({ startIndex, stopIndex }) => {
onSectionRendered({
rowStartIndex: startIndex,
rowStopIndex: stopIndex
});
}}
scrollToRow={scrollToRow}
rowCount={data.length}
rowGetter={({ index }) => data[index]}
scrollToIndex={index}
>
// Column here
</Table>
);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.