Skip to content

Commit ee7ea97

Browse files
authored
FE: Kafka Connect instances search (#1519)
1 parent 86432e2 commit ee7ea97

File tree

1 file changed

+12
-2
lines changed
  • frontend/src/components/Connect/Clusters/ui/List

1 file changed

+12
-2
lines changed

frontend/src/components/Connect/Clusters/ui/List/List.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,27 @@ import useAppParams from 'lib/hooks/useAppParams';
55
import { ClusterName } from 'lib/interfaces/cluster';
66
import { useNavigate } from 'react-router-dom';
77
import { clusterConnectorsPath } from 'lib/paths';
8-
import { createColumnHelper } from '@tanstack/react-table';
8+
import { ColumnDef, createColumnHelper } from '@tanstack/react-table';
9+
import { useQueryPersister } from 'components/common/NewTable/ColumnFilter';
910

1011
import ConnectorsCell from './Cells/ConnectorsCell';
1112
import NameCell from './Cells/NameCell';
1213
import TasksCell from './Cells/TasksCell';
1314

1415
const helper = createColumnHelper<Connect>();
1516
export const columns = [
16-
helper.accessor('name', { cell: NameCell, size: 600 }),
17+
helper.accessor('name', {
18+
cell: NameCell,
19+
size: 600,
20+
meta: { filterVariant: 'text' },
21+
filterFn: 'includesString',
22+
}),
1723
helper.accessor('version', {
1824
header: 'Version',
1925
cell: ({ getValue }) => getValue(),
2026
enableSorting: true,
27+
meta: { filterVariant: 'multi-select' },
28+
filterFn: 'includesSome',
2129
}),
2230
helper.display({
2331
header: 'Connectors',
@@ -40,6 +48,7 @@ const List = ({ connects }: Props) => {
4048
const navigate = useNavigate();
4149
const { clusterName } = useAppParams<{ clusterName: ClusterName }>();
4250

51+
const filterPersister = useQueryPersister(columns as ColumnDef<Connect>[]);
4352
return (
4453
<Table
4554
data={connects}
@@ -49,6 +58,7 @@ const List = ({ connects }: Props) => {
4958
}}
5059
emptyMessage="No kafka connect clusters"
5160
enableSorting
61+
filterPersister={filterPersister}
5262
/>
5363
);
5464
};

0 commit comments

Comments
 (0)