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

View File

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