mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-25 01:18:14 +00:00
fix(ui): block multiple paging req while fetching data (#18436)
This commit is contained in:
parent
4c3a784f7c
commit
289404748a
@ -521,9 +521,10 @@ const ClassificationDetails = forwardRef(
|
||||
size="small"
|
||||
/>
|
||||
|
||||
{showPagination && !isTagsLoading && (
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isTagsLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handleTagsPageChange}
|
||||
|
@ -183,6 +183,7 @@ const DataModelTable = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handleDataModelPageChange}
|
||||
|
@ -344,6 +344,7 @@ export const TestSuites = () => {
|
||||
<NextPrevious
|
||||
isNumberBased
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handleTestSuitesPageChange}
|
||||
|
@ -206,6 +206,7 @@ export const DatabaseSchemaTable = ({
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
isNumberBased={Boolean(searchValue)}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
|
@ -176,6 +176,7 @@ export const QualityTab = () => {
|
||||
<NextPrevious
|
||||
isNumberBased
|
||||
currentPage={currentPage}
|
||||
isLoading={isTestsLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handleTestCasePageChange}
|
||||
|
@ -631,6 +631,7 @@ const AssetsTabs = forwardRef(
|
||||
<NextPrevious
|
||||
isNumberBased
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={({ currentPage }: PagingHandlerParams) =>
|
||||
|
@ -308,6 +308,7 @@ const AppRunsHistory = forwardRef(
|
||||
<NextPrevious
|
||||
isNumberBased
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handleAppHistoryPageChange}
|
||||
|
@ -317,6 +317,7 @@ const BotListV1 = ({
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={loading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handleBotPageChange}
|
||||
|
@ -362,6 +362,7 @@ function IngestionListTable({
|
||||
<Col span={24}>
|
||||
<NextPrevious
|
||||
currentPage={ingestionPagingInfo.currentPage}
|
||||
isLoading={isLoading}
|
||||
isNumberBased={isNumberBasedPaging}
|
||||
pageSize={ingestionPagingInfo.pageSize}
|
||||
paging={ingestionPagingInfo.paging}
|
||||
|
@ -525,6 +525,7 @@ const Services = ({ serviceName }: ServicesProps) => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
isNumberBased={!isEmpty(searchTerm)}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
|
@ -401,6 +401,7 @@ export const UserTab = ({
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
isNumberBased={Boolean(searchText)}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
|
@ -27,6 +27,7 @@ interface BasicProps {
|
||||
pageSize: number;
|
||||
currentPage: number;
|
||||
isNumberBased?: boolean;
|
||||
isLoading?: boolean;
|
||||
}
|
||||
|
||||
export interface PagingProps {
|
||||
|
@ -37,6 +37,7 @@ const NextPrevious: FC<NextPreviousProps> = ({
|
||||
pageSize,
|
||||
isNumberBased = false,
|
||||
currentPage = 1,
|
||||
isLoading,
|
||||
...pagingProps
|
||||
}: NextPreviousProps) => {
|
||||
const { t } = useTranslation();
|
||||
@ -91,7 +92,7 @@ const NextPrevious: FC<NextPreviousProps> = ({
|
||||
ghost
|
||||
className="hover-button text-sm flex-center"
|
||||
data-testid="previous"
|
||||
disabled={computePrevDisableState()}
|
||||
disabled={computePrevDisableState() || isLoading}
|
||||
icon={<ArrowLeftOutlined />}
|
||||
type="primary"
|
||||
onClick={onPreviousHandler}>
|
||||
@ -105,7 +106,7 @@ const NextPrevious: FC<NextPreviousProps> = ({
|
||||
ghost
|
||||
className="hover-button text-sm flex-center"
|
||||
data-testid="next"
|
||||
disabled={computeNextDisableState()}
|
||||
disabled={computeNextDisableState() || isLoading}
|
||||
type="primary"
|
||||
onClick={onNextHandler}>
|
||||
<span> {t('label.next')}</span>
|
||||
@ -113,6 +114,7 @@ const NextPrevious: FC<NextPreviousProps> = ({
|
||||
</Button>
|
||||
{onShowSizeChange && (
|
||||
<Dropdown
|
||||
disabled={isLoading}
|
||||
menu={{
|
||||
items: pageSizeOptions.map((size) => ({
|
||||
label: `${size} / Page`,
|
||||
|
@ -185,6 +185,7 @@ function APIEndpointsTab({
|
||||
<Col span={24}>
|
||||
<NextPrevious
|
||||
currentPage={currentEndpointsPage}
|
||||
isLoading={apiEndpointsLoading}
|
||||
pageSize={PAGE_SIZE}
|
||||
paging={apiEndpoints.paging}
|
||||
pagingHandler={endpointPaginationHandler}
|
||||
|
@ -199,6 +199,7 @@ const ApplicationPage = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handleApplicationPageChange}
|
||||
|
@ -211,6 +211,7 @@ export const CustomPageSettings = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handlePersonaPageChange}
|
||||
|
@ -251,6 +251,7 @@ const KPIList = () => {
|
||||
<Col span={24}>
|
||||
<NextPrevious
|
||||
currentPage={kpiPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={PAGE_SIZE_MEDIUM}
|
||||
paging={kpiPaging}
|
||||
pagingHandler={kpiPagingHandler}
|
||||
|
@ -176,6 +176,7 @@ function SchemaTablesTab({
|
||||
<Col span={24}>
|
||||
<NextPrevious
|
||||
currentPage={currentTablesPage}
|
||||
isLoading={tableDataLoading}
|
||||
pageSize={PAGE_SIZE}
|
||||
paging={tableData.paging}
|
||||
pagingHandler={tablePaginationHandler}
|
||||
|
@ -153,6 +153,7 @@ const MarketPlacePage = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handleMarketPlacePageChange}
|
||||
|
@ -291,6 +291,7 @@ const MetricListPage = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={loadingMore}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={onPageChange}
|
||||
|
@ -275,6 +275,7 @@ const NotificationListPage = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={loadingCount > 0}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={onPageChange}
|
||||
|
@ -242,6 +242,7 @@ const ObservabilityAlertsPage = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={loading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={onPageChange}
|
||||
|
@ -162,6 +162,7 @@ export const PersonaPage = () => {
|
||||
<Col span={24}>
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handlePersonaPageChange}
|
||||
|
@ -337,6 +337,7 @@ const PoliciesListPage = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handlePaging}
|
||||
|
@ -335,6 +335,7 @@ const RolesListPage = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handlePaging}
|
||||
|
@ -214,6 +214,7 @@ function ServiceMainTabContent({
|
||||
!isEmpty(data) && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isServiceLoading}
|
||||
pageSize={PAGE_SIZE}
|
||||
paging={paging}
|
||||
pagingHandler={pagingHandler}
|
||||
|
@ -94,6 +94,7 @@ function ServiceVersionMainTabContent({
|
||||
!isEmpty(data) && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isServiceLoading}
|
||||
pageSize={PAGE_SIZE}
|
||||
paging={paging}
|
||||
pagingHandler={pagingHandler}
|
||||
|
@ -157,6 +157,7 @@ const StoredProcedureTab = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isLoading}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={storedProcedurePagingHandler}
|
||||
|
@ -476,6 +476,7 @@ const UserListPageV1 = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isLoading={isDataLoading}
|
||||
isNumberBased={Boolean(searchValue)}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
|
Loading…
x
Reference in New Issue
Block a user