mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-30 19:36:41 +00:00
Fix(UI): Incorrect Data model count (#22726)
* fixed data model tab count * moved types to interface file
This commit is contained in:
parent
98276fe8ad
commit
41e9a23e29
@ -33,3 +33,8 @@ export interface DataModelDetailsProps {
|
||||
) => Promise<void>;
|
||||
handleToggleDelete: (version?: number) => void;
|
||||
}
|
||||
|
||||
export interface DataModelTableProps {
|
||||
showDeleted: boolean;
|
||||
handleShowDeleted: (checked: boolean) => void;
|
||||
}
|
||||
|
@ -50,12 +50,15 @@ import ErrorPlaceHolder from '../../../common/ErrorWithPlaceholder/ErrorPlaceHol
|
||||
import { NextPreviousProps } from '../../../common/NextPrevious/NextPrevious.interface';
|
||||
import RichTextEditorPreviewerNew from '../../../common/RichTextEditor/RichTextEditorPreviewNew';
|
||||
import Table from '../../../common/Table/Table';
|
||||
import { DataModelTableProps } from './DataModelDetails.interface';
|
||||
|
||||
const DataModelTable = () => {
|
||||
const DataModelTable = ({
|
||||
showDeleted,
|
||||
handleShowDeleted,
|
||||
}: DataModelTableProps) => {
|
||||
const { t } = useTranslation();
|
||||
const { fqn } = useFqn();
|
||||
const [dataModels, setDataModels] = useState<Array<ServicePageData>>();
|
||||
const [showDeleted, setShowDeleted] = useState(false);
|
||||
const {
|
||||
currentPage,
|
||||
pageSize,
|
||||
@ -157,7 +160,7 @@ const DataModelTable = () => {
|
||||
};
|
||||
|
||||
const handleShowDeletedChange = (checked: boolean) => {
|
||||
setShowDeleted(checked);
|
||||
handleShowDeleted(checked);
|
||||
handlePageChange(INITIAL_PAGING_VALUE);
|
||||
handlePageSizeChange(PAGE_SIZE_BASE);
|
||||
};
|
||||
|
@ -1162,7 +1162,7 @@ const ServiceDetailsPage: FunctionComponent = () => {
|
||||
if (serviceCategory === ServiceCategory.DASHBOARD_SERVICES) {
|
||||
fetchDashboardsDataModel({ limit: 0 });
|
||||
}
|
||||
}, []);
|
||||
}, [showDeleted]);
|
||||
|
||||
useEffect(() => {
|
||||
if (servicePermission.ViewAll || servicePermission.ViewBasic) {
|
||||
@ -1419,7 +1419,12 @@ const ServiceDetailsPage: FunctionComponent = () => {
|
||||
name: t('label.data-model'),
|
||||
key: EntityTabs.DATA_Model,
|
||||
count: dataModelPaging.total,
|
||||
children: <DataModelTable />,
|
||||
children: (
|
||||
<DataModelTable
|
||||
handleShowDeleted={handleShowDeleted}
|
||||
showDeleted={showDeleted}
|
||||
/>
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user