fix: dashboard list page showing older data (#5961)

This commit is contained in:
Vikrant Gupta 2024-09-13 13:41:55 +05:30 committed by GitHub
parent 6c446226eb
commit 8d54e3b766
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,6 +91,7 @@ function DashboardsList(): JSX.Element {
const { const {
data: dashboardListResponse, data: dashboardListResponse,
isLoading: isDashboardListLoading, isLoading: isDashboardListLoading,
isRefetching: isDashboardListRefetching,
error: dashboardFetchError, error: dashboardFetchError,
refetch: refetchDashboardList, refetch: refetchDashboardList,
} = useGetAllDashboard(); } = useGetAllDashboard();
@ -703,7 +704,9 @@ function DashboardsList(): JSX.Element {
</Flex> </Flex>
</div> </div>
{isDashboardListLoading || isFilteringDashboards ? ( {isDashboardListLoading ||
isFilteringDashboards ||
isDashboardListRefetching ? (
<div className="loading-dashboard-details"> <div className="loading-dashboard-details">
<Skeleton.Input active size="large" className="skeleton-1" /> <Skeleton.Input active size="large" className="skeleton-1" />
<Skeleton.Input active size="large" className="skeleton-1" /> <Skeleton.Input active size="large" className="skeleton-1" />
@ -902,7 +905,11 @@ function DashboardsList(): JSX.Element {
columns={columns} columns={columns}
dataSource={data} dataSource={data}
showSorterTooltip showSorterTooltip
loading={isDashboardListLoading || isFilteringDashboards} loading={
isDashboardListLoading ||
isFilteringDashboards ||
isDashboardListRefetching
}
showHeader={false} showHeader={false}
pagination={paginationConfig} pagination={paginationConfig}
/> />