import React from "react"; import "./App.css"; import { connect } from "react-redux"; import * as Selectors from "./redux/selectors"; import * as Actions from "./redux/actionCreators"; import { FixedSizeGrid as Grid } from "react-window"; import Cell from "./Cell"; import { HEADING_HEIGHT } from "./constants"; const SkinTable = ({ columnCount, columnWidth, rowHeight, windowHeight, skinCount, windowWidth, getSkinData, searchQuery, }) => { function itemKey({ columnIndex, rowIndex }) { const { requestToken, data: skin } = getSkinData({ columnIndex, rowIndex, columnCount, }); if (skin == null && requestToken == null) { return `empty-cell-${columnIndex}-${rowIndex}`; } return skin ? skin.hash : `unfectched-index-${requestToken}`; } const gridRef = React.useRef(); React.useLayoutEffect(() => { if (gridRef.current == null) { return; } gridRef.current.scrollTo({ scrollLeft: 0, scrollTop: 0 }); }, [skinCount]); return (