mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-05 21:29:48 +00:00
fix(search): fix search on paginated lists (#9198)
This commit is contained in:
parent
5dd09dd62e
commit
8451c758e7
@ -92,7 +92,10 @@ export const GroupList = () => {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
onSearch={() => null}
|
onSearch={() => null}
|
||||||
onQueryChange={(q) => setQuery(q)}
|
onQueryChange={(q) => {
|
||||||
|
setPage(1);
|
||||||
|
setQuery(q);
|
||||||
|
}}
|
||||||
entityRegistry={entityRegistry}
|
entityRegistry={entityRegistry}
|
||||||
hideRecommendations
|
hideRecommendations
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -135,7 +135,10 @@ export const UserList = () => {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
onSearch={() => null}
|
onSearch={() => null}
|
||||||
onQueryChange={(q) => setQuery(q)}
|
onQueryChange={(q) => {
|
||||||
|
setPage(1);
|
||||||
|
setQuery(q);
|
||||||
|
}}
|
||||||
entityRegistry={entityRegistry}
|
entityRegistry={entityRegistry}
|
||||||
hideRecommendations
|
hideRecommendations
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -54,10 +54,10 @@ export const SecretsList = () => {
|
|||||||
input: {
|
input: {
|
||||||
start,
|
start,
|
||||||
count: pageSize,
|
count: pageSize,
|
||||||
query: query && query.length > 0 ? query : undefined,
|
query: (query?.length && query) || undefined,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fetchPolicy: query && query.length > 0 ? 'no-cache' : 'cache-first',
|
fetchPolicy: (query?.length || 0) > 0 ? 'no-cache' : 'cache-first',
|
||||||
});
|
});
|
||||||
|
|
||||||
const totalSecrets = data?.listSecrets?.total || 0;
|
const totalSecrets = data?.listSecrets?.total || 0;
|
||||||
@ -197,7 +197,10 @@ export const SecretsList = () => {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
onSearch={() => null}
|
onSearch={() => null}
|
||||||
onQueryChange={(q) => setQuery(q)}
|
onQueryChange={(q) => {
|
||||||
|
setPage(1);
|
||||||
|
setQuery(q);
|
||||||
|
}}
|
||||||
entityRegistry={entityRegistry}
|
entityRegistry={entityRegistry}
|
||||||
hideRecommendations
|
hideRecommendations
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -107,10 +107,10 @@ export const IngestionSourceList = () => {
|
|||||||
input: {
|
input: {
|
||||||
start,
|
start,
|
||||||
count: pageSize,
|
count: pageSize,
|
||||||
query,
|
query: (query?.length && query) || undefined,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fetchPolicy: 'cache-first',
|
fetchPolicy: (query?.length || 0) > 0 ? 'no-cache' : 'cache-first',
|
||||||
});
|
});
|
||||||
const [createIngestionSource] = useCreateIngestionSourceMutation();
|
const [createIngestionSource] = useCreateIngestionSourceMutation();
|
||||||
const [updateIngestionSource] = useUpdateIngestionSourceMutation();
|
const [updateIngestionSource] = useUpdateIngestionSourceMutation();
|
||||||
@ -399,7 +399,10 @@ export const IngestionSourceList = () => {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
onSearch={() => null}
|
onSearch={() => null}
|
||||||
onQueryChange={(q) => setQuery(q)}
|
onQueryChange={(q) => {
|
||||||
|
setPage(1);
|
||||||
|
setQuery(q);
|
||||||
|
}}
|
||||||
entityRegistry={entityRegistry}
|
entityRegistry={entityRegistry}
|
||||||
hideRecommendations
|
hideRecommendations
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -166,7 +166,6 @@ export const ManagePolicies = () => {
|
|||||||
data: policiesData,
|
data: policiesData,
|
||||||
refetch: policiesRefetch,
|
refetch: policiesRefetch,
|
||||||
} = useListPoliciesQuery({
|
} = useListPoliciesQuery({
|
||||||
fetchPolicy: 'no-cache',
|
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
start,
|
start,
|
||||||
@ -174,6 +173,7 @@ export const ManagePolicies = () => {
|
|||||||
query,
|
query,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
fetchPolicy: (query?.length || 0) > 0 ? 'no-cache' : 'cache-first',
|
||||||
});
|
});
|
||||||
|
|
||||||
// Any time a policy is removed, edited, or created, refetch the list.
|
// Any time a policy is removed, edited, or created, refetch the list.
|
||||||
@ -476,7 +476,10 @@ export const ManagePolicies = () => {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
onSearch={() => null}
|
onSearch={() => null}
|
||||||
onQueryChange={(q) => setQuery(q)}
|
onQueryChange={(q) => {
|
||||||
|
setPage(1);
|
||||||
|
setQuery(q);
|
||||||
|
}}
|
||||||
entityRegistry={entityRegistry}
|
entityRegistry={entityRegistry}
|
||||||
hideRecommendations
|
hideRecommendations
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -72,7 +72,6 @@ export const ManageRoles = () => {
|
|||||||
data: rolesData,
|
data: rolesData,
|
||||||
refetch: rolesRefetch,
|
refetch: rolesRefetch,
|
||||||
} = useListRolesQuery({
|
} = useListRolesQuery({
|
||||||
fetchPolicy: 'cache-first',
|
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
start,
|
start,
|
||||||
@ -80,6 +79,7 @@ export const ManageRoles = () => {
|
|||||||
query,
|
query,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
fetchPolicy: (query?.length || 0) > 0 ? 'no-cache' : 'cache-first',
|
||||||
});
|
});
|
||||||
|
|
||||||
const totalRoles = rolesData?.listRoles?.total || 0;
|
const totalRoles = rolesData?.listRoles?.total || 0;
|
||||||
@ -238,7 +238,10 @@ export const ManageRoles = () => {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
}}
|
}}
|
||||||
onSearch={() => null}
|
onSearch={() => null}
|
||||||
onQueryChange={(q) => setQuery(q)}
|
onQueryChange={(q) => {
|
||||||
|
setPage(1);
|
||||||
|
setQuery(q);
|
||||||
|
}}
|
||||||
entityRegistry={entityRegistry}
|
entityRegistry={entityRegistry}
|
||||||
/>
|
/>
|
||||||
{isBatchAddRolesModalVisible && (
|
{isBatchAddRolesModalVisible && (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user