Bug on table first load (#3117)

fix: Bug on table first load
This commit is contained in:
Andrey Kud
2023-12-21 18:30:54 -03:00
committed by GitHub
parent 41f45c953b
commit 69ffa0d229
2 changed files with 9 additions and 13 deletions

View File

@ -10,7 +10,7 @@ export const RecordTableBody = () => {
const tableRowIds = useRecoilValue(tableRowIdsState);
return (
<>
<tbody>
{tableRowIds.map((rowId, rowIndex) => (
<RowIdContext.Provider value={rowId} key={rowId}>
<RowIndexContext.Provider value={rowIndex}>
@ -19,6 +19,6 @@ export const RecordTableBody = () => {
</RowIdContext.Provider>
))}
<RecordTableBodyFetchMoreLoader />
</>
</tbody>
);
};

View File

@ -30,15 +30,11 @@ export const RecordTableBodyFetchMoreLoader = () => {
onChange: onLastRowVisible,
});
return (
<tbody ref={tbodyRef}>
{isFetchingMoreObjects && (
<StyledRow selected={false}>
<td style={{ height: 50 }} colSpan={1000}>
Loading more...
</td>
</StyledRow>
)}
</tbody>
);
return isFetchingMoreObjects ? (
<StyledRow ref={tbodyRef} selected={false}>
<td style={{ height: 50 }} colSpan={1000}>
Loading more...
</td>
</StyledRow>
) : null;
};