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:
parent
5b7f069705
commit
d14573b8f7
@ -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}
|
||||
|
@ -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',
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user