1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00

chore: add server-side search to archived flags

This commit is contained in:
Nuno Góis 2025-09-02 15:41:31 +01:00
parent 5b7f069705
commit d14573b8f7
No known key found for this signature in database
GPG Key ID: 71ECC689F1091765
2 changed files with 4 additions and 5 deletions

View File

@ -240,11 +240,7 @@ export const ArchiveTable = ({
isLoading={loading}
header={
<PageHeader
titleElement={`${title} (${
rows.length < data.length
? `${rows.length} of ${data.length}`
: data.length
})`}
titleElement={`${title} (${rows.length})`}
actions={
<Search
initialValue={searchValue}

View File

@ -3,6 +3,7 @@ import type { SortingRule } from 'react-table';
import { usePageTitle } from 'hooks/usePageTitle';
import { createLocalStorage } from 'utils/createLocalStorage';
import { useFeatureSearch } from 'hooks/api/getters/useFeatureSearch/useFeatureSearch';
import { useSearchParams } from 'react-router-dom';
const defaultSort: SortingRule<string> = { id: 'createdAt' };
const { value, setValue } = createLocalStorage(
@ -12,12 +13,14 @@ const { value, setValue } = createLocalStorage(
export const FeaturesArchiveTable = () => {
usePageTitle('Archive');
const [searchParams] = useSearchParams();
const {
features: archivedFeatures,
loading,
refetch,
} = useFeatureSearch({
query: searchParams.get('search') || undefined,
archived: 'IS:true',
});