Only suppress loading for non-paginated tables
For paginated tables, always show the loading indicator since stale data from a different page would be misleading. The loading suppression (showing stale data during refresh) only applies to the non-paginated table where the stale filtered results are still meaningful. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Fredrik Adelöw <freben@spotify.com>
This commit is contained in:
@@ -109,11 +109,13 @@ export const CatalogTable = (props: CatalogTableProps) => {
|
||||
paginationMode,
|
||||
} = entityListContext;
|
||||
|
||||
// Only show the full loading indicator when there's no data to display yet
|
||||
// (i.e. initial load). During filter changes we already have stale data to
|
||||
// show, so we keep it visible and let the new results swap in seamlessly
|
||||
// instead of briefly flashing an empty table.
|
||||
const isLoading = loading && entities.length === 0;
|
||||
// For non-paginated tables, only show the full loading indicator when
|
||||
// there's no data yet (initial load). During filter changes we keep stale
|
||||
// data visible and let the new results swap in seamlessly. For paginated
|
||||
// tables we always show loading, since stale data from a different page
|
||||
// would be misleading.
|
||||
const isLoading =
|
||||
paginationMode === 'none' ? loading && entities.length === 0 : loading;
|
||||
|
||||
const tableColumns = useMemo(
|
||||
() =>
|
||||
|
||||
Reference in New Issue
Block a user