mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 17:04:54 +00:00
Fix(ui): Failing Playwright Custom Property (#22680)
This commit is contained in:
parent
5057f29efc
commit
8aef65148f
@ -13,12 +13,13 @@
|
||||
import {
|
||||
Config,
|
||||
Field,
|
||||
FieldOrGroup,
|
||||
ImmutableTree,
|
||||
OldJsonTree,
|
||||
Utils as QbUtils,
|
||||
ValueSource,
|
||||
} from '@react-awesome-query-builder/antd';
|
||||
import { isEmpty, isEqual, isNil, isString } from 'lodash';
|
||||
import { get, isEmpty, isEqual, isNil, isString } from 'lodash';
|
||||
import Qs from 'qs';
|
||||
import {
|
||||
createContext,
|
||||
@ -29,6 +30,7 @@ import {
|
||||
useState,
|
||||
} from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { EntityType } from '../../../enums/entity.enum';
|
||||
import { SearchIndex } from '../../../enums/search.enum';
|
||||
import useCustomLocation from '../../../hooks/useCustomLocation/useCustomLocation';
|
||||
import { TabsInfoData } from '../../../pages/ExplorePage/ExplorePage.interface';
|
||||
@ -224,14 +226,18 @@ export const AdvanceSearchProvider = ({
|
||||
}, [navigate, location.pathname]);
|
||||
|
||||
const fetchCustomPropertyType = async () => {
|
||||
const subfields: Record<string, Field> = {};
|
||||
const subfields: Record<string, FieldOrGroup> = {};
|
||||
|
||||
try {
|
||||
const res = await getAllCustomProperties();
|
||||
|
||||
Object.entries(res).forEach(([resEntityType, fields]) => {
|
||||
// If entityType is specified, only include custom properties for that entity type
|
||||
if (entityType && resEntityType !== entityType) {
|
||||
if (
|
||||
entityType &&
|
||||
entityType !== EntityType.ALL &&
|
||||
resEntityType !== entityType
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -263,8 +269,11 @@ export const AdvanceSearchProvider = ({
|
||||
resEntityType.charAt(0).toUpperCase() +
|
||||
resEntityType.slice(1),
|
||||
type: '!group',
|
||||
subfields: entitySubfields,
|
||||
} as Field;
|
||||
subfields: {
|
||||
...get(subfields[resEntityType], 'subfields', {}),
|
||||
...entitySubfields,
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user