Skip to content

Commit

Permalink
Add simple filter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kdoberst committed Nov 22, 2021
1 parent d23155b commit 3741664
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/public/components/machine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { useK8sWatchResource } from './utils/k8s-watch-hook';
import VirtualizedTable, { TableData } from './factory/Table/VirtualizedTable';
import { sortResourceByValue } from './factory/Table/sort';
import { useActiveColumns } from './factory/Table/active-columns-hook';
import { tableFilters } from './factory/table-filters';

const { common } = Kebab.factory;
const menuActions = [...Kebab.getExtensionsActionsForKind(MachineModel), ...common];
Expand Down Expand Up @@ -281,7 +282,10 @@ export const MachinePage: React.FC<MachinePageProps> = ({
namespace,
});

const [data, filteredData, onFilterChange] = useListPageFilter(machines);
// FIXME - there isn't a type for a simple filter like this nor is there an easy way to add this type
const machineFilter = [{ type: 'name', filter: tableFilters.machine }];
//@ts-ignore
const [data, filteredData, onFilterChange] = useListPageFilter(machines, machineFilter);

return (
<>
Expand Down

0 comments on commit 3741664

Please sign in to comment.