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}
|
isLoading={loading}
|
||||||
header={
|
header={
|
||||||
<PageHeader
|
<PageHeader
|
||||||
titleElement={`${title} (${
|
titleElement={`${title} (${rows.length})`}
|
||||||
rows.length < data.length
|
|
||||||
? `${rows.length} of ${data.length}`
|
|
||||||
: data.length
|
|
||||||
})`}
|
|
||||||
actions={
|
actions={
|
||||||
<Search
|
<Search
|
||||||
initialValue={searchValue}
|
initialValue={searchValue}
|
||||||
|
@ -3,6 +3,7 @@ import type { SortingRule } from 'react-table';
|
|||||||
import { usePageTitle } from 'hooks/usePageTitle';
|
import { usePageTitle } from 'hooks/usePageTitle';
|
||||||
import { createLocalStorage } from 'utils/createLocalStorage';
|
import { createLocalStorage } from 'utils/createLocalStorage';
|
||||||
import { useFeatureSearch } from 'hooks/api/getters/useFeatureSearch/useFeatureSearch';
|
import { useFeatureSearch } from 'hooks/api/getters/useFeatureSearch/useFeatureSearch';
|
||||||
|
import { useSearchParams } from 'react-router-dom';
|
||||||
|
|
||||||
const defaultSort: SortingRule<string> = { id: 'createdAt' };
|
const defaultSort: SortingRule<string> = { id: 'createdAt' };
|
||||||
const { value, setValue } = createLocalStorage(
|
const { value, setValue } = createLocalStorage(
|
||||||
@ -12,12 +13,14 @@ const { value, setValue } = createLocalStorage(
|
|||||||
|
|
||||||
export const FeaturesArchiveTable = () => {
|
export const FeaturesArchiveTable = () => {
|
||||||
usePageTitle('Archive');
|
usePageTitle('Archive');
|
||||||
|
const [searchParams] = useSearchParams();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
features: archivedFeatures,
|
features: archivedFeatures,
|
||||||
loading,
|
loading,
|
||||||
refetch,
|
refetch,
|
||||||
} = useFeatureSearch({
|
} = useFeatureSearch({
|
||||||
|
query: searchParams.get('search') || undefined,
|
||||||
archived: 'IS:true',
|
archived: 'IS:true',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user