mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-07 13:07:22 +00:00
parent
43f4417f8d
commit
abb4d0f218
@ -51,6 +51,7 @@ import {
|
||||
getSeparator,
|
||||
getServiceLogo,
|
||||
requiredField,
|
||||
restrictFormSubmit,
|
||||
} from '../../../utils/CommonUtils';
|
||||
import {
|
||||
getIngestionTypeList,
|
||||
@ -2149,7 +2150,10 @@ export const AddServiceModal: FunctionComponent<Props> = ({
|
||||
}
|
||||
steps={steps}
|
||||
/>
|
||||
<form className="tw-min-w-full" data-testid="form">
|
||||
<form
|
||||
className="tw-min-w-full"
|
||||
data-testid="form"
|
||||
onSubmit={restrictFormSubmit}>
|
||||
<div className="tw-px-4 tw-pt-3 tw-mx-auto">
|
||||
{getActiveStepFields(activeStepperStep)}
|
||||
</div>
|
||||
|
||||
@ -119,7 +119,6 @@ const ServicesPage = () => {
|
||||
const [editData, setEditData] = useState<ServiceDataObj>();
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
const [searchText, setSearchText] = useState('');
|
||||
const [currentTabTotalCount, setCurrentTabTotalCount] = useState(0);
|
||||
|
||||
const [servicesCount, setServicesCount] = useState({
|
||||
databaseServices: 0,
|
||||
@ -168,7 +167,6 @@ const ServicesPage = () => {
|
||||
setServiceList(
|
||||
serviceRecord[serviceName] as unknown as Array<ServiceDataObj>
|
||||
);
|
||||
setCurrentTabTotalCount(servicePaging[serviceName].total || 0);
|
||||
}
|
||||
setIsLoading(false);
|
||||
}
|
||||
@ -349,10 +347,6 @@ const ServicesPage = () => {
|
||||
|
||||
const handleTabChange = (tabName: ServiceTypes) => {
|
||||
setSearchText('');
|
||||
setServicesCount({
|
||||
...servicesCount,
|
||||
[serviceName]: currentTabTotalCount,
|
||||
});
|
||||
setServiceName(tabName);
|
||||
setServiceList(services[tabName] as unknown as Array<ServiceDataObj>);
|
||||
};
|
||||
@ -496,10 +490,6 @@ const ServicesPage = () => {
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setCurrentTabTotalCount(servicesCount[serviceName]);
|
||||
}, [serviceName]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{!isLoading ? (
|
||||
|
||||
@ -346,8 +346,8 @@ const TeamsPage = () => {
|
||||
}}>
|
||||
<p
|
||||
className="tag-category label-category tw-self-center tw-truncate tw-w-52"
|
||||
title={team.displayName}>
|
||||
{team.displayName}
|
||||
title={team.displayName ?? team.name}>
|
||||
{team.displayName ?? team.name}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@ -20,7 +20,7 @@ import {
|
||||
RecentlyViewedData,
|
||||
} from 'Models';
|
||||
import { utc } from 'moment';
|
||||
import React from 'react';
|
||||
import React, { FormEvent } from 'react';
|
||||
import { reactLocalStorage } from 'reactjs-localstorage';
|
||||
import AppState from '../AppState';
|
||||
import {
|
||||
@ -382,3 +382,7 @@ export const getFields = (defaultFields: string, tabSpecificField: string) => {
|
||||
|
||||
return `${defaultFields}, ${tabSpecificField}`;
|
||||
};
|
||||
|
||||
export const restrictFormSubmit = (e: FormEvent) => {
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user