mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-17 13:45:54 +00:00
fix(ui) Disable cache on Domain and Glossary Related Entities pages (#7867)
This commit is contained in:
parent
1ff6949e36
commit
b58894662e
@ -24,6 +24,7 @@ export const DomainEntitiesTab = () => {
|
||||
}}
|
||||
emptySearchQuery="*"
|
||||
placeholderText="Filter domain entities..."
|
||||
skipCache
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -46,6 +46,7 @@ export default function GlossaryRelatedEntity() {
|
||||
}}
|
||||
emptySearchQuery="*"
|
||||
placeholderText="Filter entities..."
|
||||
skipCache
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -1,7 +1,12 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { ApolloError } from '@apollo/client';
|
||||
import { EntityType, FacetFilterInput, FacetMetadata } from '../../../../../../types.generated';
|
||||
import {
|
||||
EntityType,
|
||||
FacetFilterInput,
|
||||
FacetMetadata,
|
||||
SearchAcrossEntitiesInput,
|
||||
} from '../../../../../../types.generated';
|
||||
import { ENTITY_FILTER_NAME, UnionType } from '../../../../../search/utils/constants';
|
||||
import { SearchCfg } from '../../../../../../conf';
|
||||
import { EmbeddedListSearchResults } from './EmbeddedListSearchResults';
|
||||
@ -73,6 +78,7 @@ type Props = {
|
||||
defaultFilters?: Array<FacetFilterInput>;
|
||||
searchBarStyle?: any;
|
||||
searchBarInputStyle?: any;
|
||||
skipCache?: boolean;
|
||||
useGetSearchResults?: (params: GetSearchResultsParams) => {
|
||||
data: SearchResultsInterface | undefined | null;
|
||||
loading: boolean;
|
||||
@ -100,6 +106,7 @@ export const EmbeddedListSearch = ({
|
||||
defaultFilters,
|
||||
searchBarStyle,
|
||||
searchBarInputStyle,
|
||||
skipCache,
|
||||
useGetSearchResults = useWrappedSearchResults,
|
||||
shouldRefetch,
|
||||
resetShouldRefetch,
|
||||
@ -146,13 +153,16 @@ export const EmbeddedListSearch = ({
|
||||
return refetchForDownload(variables).then((res) => res.data.scrollAcrossEntities);
|
||||
};
|
||||
|
||||
const searchInput = {
|
||||
let searchInput: SearchAcrossEntitiesInput = {
|
||||
types: entityFilters,
|
||||
query: finalQuery,
|
||||
start: (page - 1) * numResultsPerPage,
|
||||
count: numResultsPerPage,
|
||||
orFilters: finalFilters,
|
||||
};
|
||||
if (skipCache) {
|
||||
searchInput = { ...searchInput, searchFlags: { skipCache: true } };
|
||||
}
|
||||
|
||||
const { data, loading, error, refetch } = useGetSearchResults({
|
||||
variables: {
|
||||
|
@ -31,6 +31,7 @@ type Props = {
|
||||
defaultFilters?: Array<FacetFilterInput>;
|
||||
searchBarStyle?: any;
|
||||
searchBarInputStyle?: any;
|
||||
skipCache?: boolean;
|
||||
useGetSearchResults?: (params: GetSearchResultsParams) => {
|
||||
data: SearchResultsInterface | undefined | null;
|
||||
loading: boolean;
|
||||
@ -50,6 +51,7 @@ export const EmbeddedListSearchSection = ({
|
||||
defaultFilters,
|
||||
searchBarStyle,
|
||||
searchBarInputStyle,
|
||||
skipCache,
|
||||
useGetSearchResults,
|
||||
shouldRefetch,
|
||||
resetShouldRefetch,
|
||||
@ -133,6 +135,7 @@ export const EmbeddedListSearchSection = ({
|
||||
defaultFilters={defaultFilters}
|
||||
searchBarStyle={searchBarStyle}
|
||||
searchBarInputStyle={searchBarInputStyle}
|
||||
skipCache={skipCache}
|
||||
useGetSearchResults={useGetSearchResults}
|
||||
shouldRefetch={shouldRefetch}
|
||||
resetShouldRefetch={resetShouldRefetch}
|
||||
|
@ -82,6 +82,7 @@ const ContentContainer = styled.div`
|
||||
height: auto;
|
||||
min-height: 100%;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
`;
|
||||
|
||||
const HeaderAndTabs = styled.div`
|
||||
|
@ -13,6 +13,7 @@ import { useEntityRegistry } from '../useEntityRegistry';
|
||||
const ContentWrapper = styled.div`
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
`;
|
||||
|
||||
export default function GlossaryRoutes() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user