show added columns

This commit is contained in:
Jan Prochazka
2020-03-08 18:51:37 +01:00
parent 2e596cf24d
commit 8d731731b3
5 changed files with 98 additions and 16 deletions

View File

@@ -152,10 +152,22 @@ export default function DataGridCore(props) {
// const visibleRowCountUpperBound = 20;
// const visibleRowCountLowerBound = 20;
const reload = () => {
setLoadProps({
isLoading: false,
loadedRows: [],
isLoadedAll: false,
loadedTime: new Date().getTime(),
});
};
React.useEffect(() => {
if (!isLoadedAll && firstVisibleRowScrollIndex + visibleRowCountUpperBound >= loadedRows.length) {
loadNextData();
}
if (display.cache.refreshTime > loadedTime) {
reload();
}
});
if (!loadedRows || !columns) return null;