mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-17 14:09:52 +00:00
MINOR: fix the dropdown not showing in case of no data in glossary (#16256)
* fix the dropdown not showing in case of no data in glossary * minor fix
This commit is contained in:
parent
c3abcc22b6
commit
fc00b61e59
@ -73,6 +73,7 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
|
||||
const form = Form.useFormInstance();
|
||||
|
||||
const fetchGlossaryListInternal = async () => {
|
||||
setIsLoading(true);
|
||||
try {
|
||||
const { data } = await getGlossariesList({
|
||||
limit: PAGE_SIZE_LARGE,
|
||||
@ -91,11 +92,12 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
|
||||
|
||||
const dropdownRender = (menu: React.ReactElement) => (
|
||||
<>
|
||||
{menu}
|
||||
{isLoading ? <Loader size="small" /> : menu}
|
||||
<Space className="p-sm p-b-xss p-l-xs custom-dropdown-render" size={8}>
|
||||
<Button
|
||||
className="update-btn"
|
||||
data-testid="saveAssociatedTag"
|
||||
disabled={isEmpty(glossaries)}
|
||||
htmlType="submit"
|
||||
loading={isSubmitLoading}
|
||||
size="small"
|
||||
@ -211,7 +213,6 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
|
||||
if (!params?.glossary) {
|
||||
return;
|
||||
}
|
||||
setIsLoading(true);
|
||||
try {
|
||||
const results = await queryGlossaryTerms(params.glossary);
|
||||
|
||||
@ -229,8 +230,6 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
|
||||
);
|
||||
} catch (error) {
|
||||
showErrorToast(error as AxiosError);
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -282,7 +281,6 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
|
||||
|
||||
return Promise.resolve();
|
||||
}}
|
||||
notFoundContent={isLoading ? <Loader size="small" /> : null}
|
||||
showCheckedStrategy={TreeSelect.SHOW_ALL}
|
||||
style={{ width: '100%' }}
|
||||
switcherIcon={
|
||||
|
Loading…
x
Reference in New Issue
Block a user