From 25264edc453b9a5426589d7d88274123cd685540 Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Mon, 26 Jun 2023 19:30:36 +0530 Subject: [PATCH] supported pagination of tags in glossary overiew section for tags --- .../DashboardDetails.component.tsx | 6 +- .../DataModels/DataModelDetails.component.tsx | 6 +- .../InfiniteSelectScroll.tsx | 24 ++++--- .../MlModelDetail/MlModelDetail.component.tsx | 6 +- .../PipelineDetails.component.tsx | 6 +- .../TableTags/TableTags.component.tsx | 6 +- .../TagsContainerV2.interface.ts} | 2 +- .../TagsContainerV2.tsx} | 26 +++---- .../Tag/TagsV1/TagsV1.component.tsx | 25 ++++++- .../components/Tag/TagsV1/TagsV1.interface.ts | 2 + .../ui/src/components/Tag/TagsV1/tagsV1.less | 16 +++-- .../TagsInput/TagsInput.component.tsx | 70 +------------------ .../TopicDetails/TopicDetails.component.tsx | 6 +- .../src/pages/ContainerPage/ContainerPage.tsx | 6 +- .../TableDetailsPageV1/TableDetailsPageV1.tsx | 6 +- 15 files changed, 87 insertions(+), 126 deletions(-) rename openmetadata-ui/src/main/resources/ui/src/components/Tag/{TagsContainerInfiniteScroll/TagsContainerInfiniteScroll.interface.ts => TagsContainerV2/TagsContainerV2.interface.ts} (96%) rename openmetadata-ui/src/main/resources/ui/src/components/Tag/{TagsContainerInfiniteScroll/TagsContainerInfiniteScroll.tsx => TagsContainerV2/TagsContainerV2.tsx} (94%) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx index 8ee9557dbbe6..25a2be30d1db 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx @@ -26,7 +26,7 @@ import { DataAssetsHeader } from 'components/DataAssets/DataAssetsHeader/DataAss import { EntityName } from 'components/Modals/EntityNameModal/EntityNameModal.interface'; import TableTags from 'components/TableTags/TableTags.component'; import TabsLabel from 'components/TabsLabel/TabsLabel.component'; -import TagsContainerInfiniteScroll from 'components/Tag/TagsContainerInfiniteScroll/TagsContainerInfiniteScroll'; +import TagsContainerV2 from 'components/Tag/TagsContainerV2/TagsContainerV2'; import { getDashboardDetailsPath } from 'constants/constants'; import { compare } from 'fast-json-patch'; import { TagSource } from 'generated/type/schema'; @@ -598,7 +598,7 @@ const DashboardDetails = ({ data-testid="entity-right-panel" flex="320px"> - - - - = ({ setOptions(res.data); setPaging(res.paging); setSearchValue(value); - setIsLoading(false); } catch (error) { showErrorToast(error as AxiosError); + } finally { + setIsLoading(false); } }, [fetchOptions] @@ -109,22 +111,22 @@ const InfiniteSelectScroll: FC = ({ } }; + const dropdownRender = (menu: React.ReactElement) => ( + <> + {menu} + {hasContentLoading ? : null} + + ); + return (