diff --git a/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_filter_config.tsx b/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_filter_config.tsx
index 7bfee49539f01..2153fe30b2fc4 100644
--- a/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_filter_config.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_filter_config.tsx
@@ -116,9 +116,7 @@ export const useFilterConfig = ({
setActiveByFilterKey(newActiveByFilterKey);
};
- const filterConfigArray = Array.from(filterConfigs.values()).filter(
- (filter) => filter.isAvailable
- );
+ const filterConfigArray = Array.from(filterConfigs.values());
const selectableOptions = filterConfigArray
.map(({ key, label }) => ({
key,
diff --git a/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_system_filter_config.tsx b/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_system_filter_config.tsx
index aa4dbfb4f6335..dfae1c15b0fc6 100644
--- a/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_system_filter_config.tsx
+++ b/x-pack/plugins/cases/public/components/all_cases/table_filter_config/use_system_filter_config.tsx
@@ -17,7 +17,7 @@ import { SeverityFilter } from '../severity_filter';
import { AssigneesFilterPopover } from '../assignees_filter';
import type { CurrentUserProfile } from '../../types';
import type { AssigneesFilteringSelection } from '../../user_profiles/types';
-import type { FilterChangeHandler, FilterConfig } from './types';
+import type { FilterChangeHandler, FilterConfig, FilterConfigRenderParams } from './types';
interface UseFilterConfigProps {
availableSolutions: string[];
@@ -61,7 +61,7 @@ export const getSystemFilterConfig = ({
deactivate: () => {
onFilterOptionChange({ filterId: 'severity', selectedOptionKeys: [] });
},
- render: ({ filterOptions, onChange }) => (
+ render: ({ filterOptions, onChange }: FilterConfigRenderParams) => (
),
},
@@ -73,7 +73,7 @@ export const getSystemFilterConfig = ({
deactivate: () => {
onFilterOptionChange({ filterId: 'status', selectedOptionKeys: [] });
},
- render: ({ filterOptions, onChange }) => (
+ render: ({ filterOptions, onChange }: FilterConfigRenderParams) => (
{
handleSelectedAssignees([]);
},
- render: ({ filterOptions, onChange }) => {
+ render: ({ filterOptions, onChange }: FilterConfigRenderParams) => {
return (
{
onFilterOptionChange({ filterId: 'tags', selectedOptionKeys: [] });
},
- render: ({ filterOptions, onChange }) => (
+ render: ({ filterOptions, onChange }: FilterConfigRenderParams) => (
{
onFilterOptionChange({ filterId: 'category', selectedOptionKeys: [] });
},
- render: ({ filterOptions, onChange }) => (
+ render: ({ filterOptions, onChange }: FilterConfigRenderParams) => (
{
onFilterOptionChange({ filterId: 'owner', selectedOptionKeys: availableSolutions });
},
- render: ({ filterOptions, onChange }) => (
+ render: ({ filterOptions, onChange }: FilterConfigRenderParams) => (
),
},
- ];
+ ].filter((filter) => filter.isAvailable) as FilterConfig[];
};
export const useSystemFilterConfig = ({